Package com.facebook.soloader
Class ElfZipFileChannel
java.lang.Object
com.facebook.soloader.ElfZipFileChannel
- All Implemented Interfaces:
ElfByteChannel,Closeable,AutoCloseable,ByteChannel,Channel,ReadableByteChannel,WritableByteChannel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanisOpen()longposition()position(long newPosition) intread(ByteBuffer dst) Reads a sequence of bytes from this channel into the given buffer.intread(ByteBuffer dst, long position) Reads a sequence of bytes from this channel into the given buffer, starting at the given file position.longsize()truncate(long size) intwrite(ByteBuffer src)
-
Constructor Details
-
ElfZipFileChannel
- Throws:
IOException
-
-
Method Details
-
position
- Specified by:
positionin interfaceElfByteChannel- Throws:
IOException
-
position
- Specified by:
positionin interfaceElfByteChannel- Throws:
IOException
-
read
Reads a sequence of bytes from this channel into the given buffer. Bytes are read starting at this channel's current file position, and then the file position is updated with the number of bytes actually read.- Specified by:
readin interfaceElfByteChannel- Specified by:
readin interfaceReadableByteChannel- Returns:
- The number of bytes read, possibly zero, or -1 if the channel has reached end-of-stream
- Throws:
IOException
-
read
Reads a sequence of bytes from this channel into the given buffer, starting at the given file position.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).
- Specified by:
readin interfaceElfByteChannel- Returns:
- The number of bytes read, possibly zero, or -1 if the given position is greater than or equal to the file's current size
- Throws:
IOException
-
size
- Specified by:
sizein interfaceElfByteChannel- Throws:
IOException
-
truncate
- Specified by:
truncatein interfaceElfByteChannel- Throws:
IOException
-
write
- Specified by:
writein interfaceElfByteChannel- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-
isOpen
public boolean isOpen() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-