decodeText implementation is reformatted

This commit is contained in:
Afshin 2019-10-06 11:22:18 +02:00
parent 750aab063e
commit da1ac659fb
1 changed files with 2 additions and 5 deletions

View File

@ -39,10 +39,7 @@ public class CharacterEncodingExamples {
CharsetDecoder charsetDecoder = charset.newDecoder(); CharsetDecoder charsetDecoder = charset.newDecoder();
charsetDecoder.onMalformedInput(codingErrorAction); charsetDecoder.onMalformedInput(codingErrorAction);
return new BufferedReader( return new BufferedReader(
new InputStreamReader( new InputStreamReader(
new ByteArrayInputStream(input.getBytes()), new ByteArrayInputStream(input.getBytes()), charsetDecoder)).readLine();
charsetDecoder))
.readLine();
} }
} }