/** * Constructs a new InputStreamReader on the InputStream {@code in} and * Charset {@code charset}. * * @param in * the source InputStream from which to read characters. * @param charset * the Charset that defines the character converter */ public InputStreamReader(InputStream inJ, java.nio.charset.Charset charset) : base(inJ) { this.inJ = inJ; decoder = charset.newDecoder().onMalformedInput( java.nio.charset.CodingErrorAction.REPLACE).onUnmappableCharacter( java.nio.charset.CodingErrorAction.REPLACE); bytes.limit(0); }