249 |
this.in = in; |
this.in = in; |
250 |
this.decoder = decoder; |
this.decoder = decoder; |
251 |
|
|
252 |
|
Charset charset = decoder.charset(); |
253 |
try { |
try { |
254 |
maxBytesPerChar = decoder.charset().newEncoder().maxBytesPerChar(); |
if (charset == null) |
255 |
|
maxBytesPerChar = 1f; |
256 |
|
else |
257 |
|
maxBytesPerChar = charset.newEncoder().maxBytesPerChar(); |
258 |
} catch(UnsupportedOperationException _){ |
} catch(UnsupportedOperationException _){ |
259 |
maxBytesPerChar = 1f; |
maxBytesPerChar = 1f; |
260 |
} |
} |
262 |
decoder.onMalformedInput(CodingErrorAction.REPLACE); |
decoder.onMalformedInput(CodingErrorAction.REPLACE); |
263 |
decoder.onUnmappableCharacter(CodingErrorAction.REPLACE); |
decoder.onUnmappableCharacter(CodingErrorAction.REPLACE); |
264 |
decoder.reset(); |
decoder.reset(); |
265 |
encoding = EncodingHelper.getOldCanonical(decoder.charset().name()); |
if (charset == null) |
266 |
|
encoding = "US-ASCII"; |
267 |
|
else |
268 |
|
encoding = EncodingHelper.getOldCanonical(decoder.charset().name()); |
269 |
} |
} |
270 |
|
|
271 |
/** |
/** |