public class ElfZipFileChannel extends java.lang.Object implements ElfByteChannel
| Constructor and Description |
|---|
ElfZipFileChannel(java.util.zip.ZipFile zipFile,
java.util.zip.ZipEntry zipEntry) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpen() |
long |
position() |
ElfByteChannel |
position(long newPosition) |
int |
read(java.nio.ByteBuffer dst)
Reads a sequence of bytes from this channel into the given buffer.
|
int |
read(java.nio.ByteBuffer dst,
long position)
Reads a sequence of bytes from this channel into the given buffer, starting at the given file
position.
|
long |
size() |
ElfByteChannel |
truncate(long size) |
int |
write(java.nio.ByteBuffer src) |
public ElfZipFileChannel(java.util.zip.ZipFile zipFile,
java.util.zip.ZipEntry zipEntry)
throws java.io.IOException
java.io.IOExceptionpublic long position()
throws java.io.IOException
position in interface ElfByteChanneljava.io.IOExceptionpublic ElfByteChannel position(long newPosition) throws java.io.IOException
position in interface ElfByteChanneljava.io.IOExceptionpublic int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface ElfByteChannelread in interface java.nio.channels.ReadableByteChanneljava.io.IOExceptionpublic int read(java.nio.ByteBuffer dst,
long position)
throws java.io.IOException
N.B. The file position is updated with the number of bytes actually read. It's different from FileChannel.html#read(java.nio.ByteBuffer, long).
read in interface ElfByteChanneljava.io.IOExceptionpublic long size()
throws java.io.IOException
size in interface ElfByteChanneljava.io.IOExceptionpublic ElfByteChannel truncate(long size) throws java.io.IOException
truncate in interface ElfByteChanneljava.io.IOExceptionpublic int write(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface ElfByteChannelwrite in interface java.nio.channels.WritableByteChanneljava.io.IOExceptionpublic boolean isOpen()
isOpen in interface java.nio.channels.Channelpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channeljava.io.IOException