@Test public void getChannel() throws Exception { ReadableByteChannel channel = mReader.getChannel(); Assert.assertNotNull(channel); ByteBuffer buffer = ByteBuffer.allocate((int) TEST_BLOCK_SIZE); int bytesRead = channel.read(buffer); Assert.assertEquals(TEST_BLOCK_SIZE, bytesRead); Assert.assertTrue(BufferUtils.equalIncreasingByteBuffer(0, (int) TEST_BLOCK_SIZE, buffer)); }
@Override public ReadableByteChannel getChannel() { return mLocalFileChannel; }
LocalFileBlockReader extends BlockReader { @Override public ReadableByteChannel getChannel() { return mLocalFileChannel; } }
LocalFileBlockReader extends BlockReader { @Override public ReadableByteChannel getChannel() { return mLocalFileChannel; } LocalFileBlockReader(String path); }
LocalFileBlockReader extends BlockReader { @Override public ReadableByteChannel getChannel() { return mLocalFileChannel; } LocalFileBlockReader(String path); @Override ReadableByteChannel getChannel(); @Override long getLength(); void increaseUsageCount(); void decreaseUsageCount(); int getUsageCount(); String getFilePath(); @Override ByteBuffer read(long offset, long length); @Override int transferTo(ByteBuf buf); @Override void close(); @Override boolean isClosed(); }
LocalFileBlockReader extends BlockReader { @Override public ReadableByteChannel getChannel() { return mLocalFileChannel; } LocalFileBlockReader(String path); @Override ReadableByteChannel getChannel(); @Override long getLength(); void increaseUsageCount(); void decreaseUsageCount(); int getUsageCount(); String getFilePath(); @Override ByteBuffer read(long offset, long length); @Override int transferTo(ByteBuf buf); @Override void close(); @Override boolean isClosed();  }