@Test public void readArrayNoExtentsTest() throws IOException { final List<Map<String,Object>> extents = Collections.emptyList(); final FSDataInputStream in = new ArrayFSDataInputStream(new byte[0]); final InputStream eis = new ExtentsInputStream(in, extents); final byte[] buf = { 17 }; assertEquals(-1, eis.read(buf, 0, buf.length)); assertEquals(17, buf[0]); }
@Override public int read() throws IOException { final byte[] b = new byte[1]; int rlen; do { rlen = read(b, 0, 1); } while (rlen == 0); return rlen == -1 ? -1 : b[0]; }
ExtentsInputStream extends InputStream { @Override public int read() throws IOException { final byte[] b = new byte[1]; int rlen; do { rlen = read(b, 0, 1); } while (rlen == 0); return rlen == -1 ? -1 : b[0]; } }
ExtentsInputStream extends InputStream { @Override public int read() throws IOException { final byte[] b = new byte[1]; int rlen; do { rlen = read(b, 0, 1); } while (rlen == 0); return rlen == -1 ? -1 : b[0]; } ExtentsInputStream(FSDataInputStream in,
                            List<Map<String,Object>> extents); }
ExtentsInputStream extends InputStream { @Override public int read() throws IOException { final byte[] b = new byte[1]; int rlen; do { rlen = read(b, 0, 1); } while (rlen == 0); return rlen == -1 ? -1 : b[0]; } ExtentsInputStream(FSDataInputStream in,
                            List<Map<String,Object>> extents); @Override int read(); @Override int read(byte[] buf, int off, int len); }
ExtentsInputStream extends InputStream { @Override public int read() throws IOException { final byte[] b = new byte[1]; int rlen; do { rlen = read(b, 0, 1); } while (rlen == 0); return rlen == -1 ? -1 : b[0]; } ExtentsInputStream(FSDataInputStream in,
                            List<Map<String,Object>> extents); @Override int read(); @Override int read(byte[] buf, int off, int len);  }