@Test public void zeroLengthArrayReadTest() throws IOException { Reader reader = new StringReader("abc"); InputStream is = new ReaderInputStream(reader); byte[] bytes = new byte[4]; assertEquals("requested 0 byte read", 0, is.read(bytes, 1, 0)); }
@Override public int read() throws IOException { int res = 0; while (res != -1) { res = read(oneByte); if (res > 0) { return oneByte[0]; } } return -1; }
ReaderInputStream extends InputStream { @Override public int read() throws IOException { int res = 0; while (res != -1) { res = read(oneByte); if (res > 0) { return oneByte[0]; } } return -1; } }
ReaderInputStream extends InputStream { @Override public int read() throws IOException { int res = 0; while (res != -1) { res = read(oneByte); if (res > 0) { return oneByte[0]; } } return -1; } ReaderInputStream(Reader reader);   ReaderInputStream(Reader reader, int charBufferSize); }
ReaderInputStream extends InputStream { @Override public int read() throws IOException { int res = 0; while (res != -1) { res = read(oneByte); if (res > 0) { return oneByte[0]; } } return -1; } ReaderInputStream(Reader reader);   ReaderInputStream(Reader reader, int charBufferSize); @Override int read(); @Override int read(byte[] b, int off, int len); @Override void close(); }
ReaderInputStream extends InputStream { @Override public int read() throws IOException { int res = 0; while (res != -1) { res = read(oneByte); if (res > 0) { return oneByte[0]; } } return -1; } ReaderInputStream(Reader reader);   ReaderInputStream(Reader reader, int charBufferSize); @Override int read(); @Override int read(byte[] b, int off, int len); @Override void close();  }