SevenZipReader implements SeekableByteChannel { @Override public long size() throws IOException { return reader.length(); } SevenZipReader(final WindowReader reader); @Override int read(final ByteBuffer dst); @Override int write(ByteBuffer src); @Override long position(); @Override SeekableByteChannel position(long newPosition); @Override long size(); @Override SeekableByteChannel truncate(long size); @Override boolean isOpen(); @Override void close(); @Override String toString();  }
@Test public void testSize() throws Exception { assertEquals(reader.length(), zip.size()); }