@Test public void getSizeOfNewChannel_shouldReturnTheLengthOfTheInputByteArray() throws IOException { try(SeekableByteChannel channel = new GfsSeekableByteChannel(file, singleton(READ))) { assertEquals(FILE_DATA.length, channel.size()); } }
@Override public long size() throws ClosedChannelException { checkClosed(); return buffer.limit(); }
GfsSeekableByteChannel implements SeekableByteChannel { @Override public long size() throws ClosedChannelException { checkClosed(); return buffer.limit(); } }
GfsSeekableByteChannel implements SeekableByteChannel { @Override public long size() throws ClosedChannelException { checkClosed(); return buffer.limit(); } GfsSeekableByteChannel(FileNode file, Collection<? extends OpenOption> options); }
GfsSeekableByteChannel implements SeekableByteChannel { @Override public long size() throws ClosedChannelException { checkClosed(); return buffer.limit(); } GfsSeekableByteChannel(FileNode file, Collection<? extends OpenOption> options); @Override int read(ByteBuffer dst); @Override int write(ByteBuffer src); @Override long position(); @Override GfsSeekableByteChannel position(long newPosition); @Override long size(); @Override GfsSeekableByteChannel truncate(long size); @Override boolean isOpen(); @Nonnull byte[] getBytes(); @Override void close(); }
GfsSeekableByteChannel implements SeekableByteChannel { @Override public long size() throws ClosedChannelException { checkClosed(); return buffer.limit(); } GfsSeekableByteChannel(FileNode file, Collection<? extends OpenOption> options); @Override int read(ByteBuffer dst); @Override int write(ByteBuffer src); @Override long position(); @Override GfsSeekableByteChannel position(long newPosition); @Override long size(); @Override GfsSeekableByteChannel truncate(long size); @Override boolean isOpen(); @Nonnull byte[] getBytes(); @Override void close();  }