Re: Replacing deprecated String constructor

2012-12-26 Thread Xueming Shen
Yes, they should be equivalent, except the performance will be slightly different. The "deprecated" one is faster. And in most cases, the new String(..., String charsetName) version is faster than the new String(..., Charset cs) version. -sherman On 12/26/2012 9:50 AM, mikhail cherkasov wro

Replacing deprecated String constructor

2012-12-26 Thread mikhail cherkasov
Hi All, I work on removing javac's warring and not sure about how properly replace deprecated String constructors. Is 'new String(data, off, len, StandardCharsets.ISO_8859_1)' equivalent replacement for 'new String(data, 0, off, len)' ? Thanks, Mikhail.