@Test public void testReadArrayOffsetLength() throws Exception { assertEquals(1, in.read(bs, 2, 1)); byte[] expected = new byte[] { (byte) 1, (byte) 2, DATA_BYTES[0], (byte) 4 }; assertArrayEquals(expected, bs); }
@Override public int read() throws IOException { if (bb.remaining() == 0) { return -1; } return bb.get() & 0xff; }
ByteBufferInputStream extends InputStream { @Override public int read() throws IOException { if (bb.remaining() == 0) { return -1; } return bb.get() & 0xff; } }
ByteBufferInputStream extends InputStream { @Override public int read() throws IOException { if (bb.remaining() == 0) { return -1; } return bb.get() & 0xff; } ByteBufferInputStream(ByteBuffer bb); }
ByteBufferInputStream extends InputStream { @Override public int read() throws IOException { if (bb.remaining() == 0) { return -1; } return bb.get() & 0xff; } ByteBufferInputStream(ByteBuffer bb); @Override int read(); @Override int available(); @Override int read(byte[] b, int off, int len); @Override int read(byte[] b); @Override long skip(long n); static void byteBuffer2Record(ByteBuffer bb, Record record); }
ByteBufferInputStream extends InputStream { @Override public int read() throws IOException { if (bb.remaining() == 0) { return -1; } return bb.get() & 0xff; } ByteBufferInputStream(ByteBuffer bb); @Override int read(); @Override int available(); @Override int read(byte[] b, int off, int len); @Override int read(byte[] b); @Override long skip(long n); static void byteBuffer2Record(ByteBuffer bb, Record record);  }