Description
I have the following failing test case for ToNetASCIIInputStream:
public void testToNetASCIIInputStream() throws Exception { final Charset ASCII = Charset.forName("ASCII"); byte[] data = "Hello\nWorld\n".getBytes(ASCII); InputStream source = new ByteArrayInputStream(data); ToNetASCIIInputStream toNetASCII = new ToNetASCIIInputStream(source); byte[] output = new byte[512]; int length = toNetASCII.read(output); byte[] result = new byte[length]; System.arraycopy(output, 0, result, 0, length); assertEquals('\r', result[length-2]); assertEquals('\n', result[length-1]); }