Package com.facebook.soloader
Class ElfFileChannel
- java.lang.Object
-
- com.facebook.soloader.ElfFileChannel
-
- All Implemented Interfaces:
ElfByteChannel,java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.ByteChannel,java.nio.channels.Channel,java.nio.channels.ReadableByteChannel,java.nio.channels.WritableByteChannel
public class ElfFileChannel extends java.lang.Object implements ElfByteChannel
-
-
Constructor Summary
Constructors Constructor Description ElfFileChannel(java.io.File file)
-
Method Summary
Modifier and Type Method Description voidclose()booleanisOpen()voidopenChannel()longposition()ElfByteChannelposition(long newPosition)intread(java.nio.ByteBuffer dst)intread(java.nio.ByteBuffer dst, long position)longsize()ElfByteChanneltruncate(long size)intwrite(java.nio.ByteBuffer src)
-
-
-
Method Detail
-
openChannel
public void openChannel() throws java.io.IOException- Throws:
java.io.IOException
-
position
public long position() throws java.io.IOException- Specified by:
positionin interfaceElfByteChannel- Throws:
java.io.IOException
-
position
public ElfByteChannel position(long newPosition) throws java.io.IOException
- Specified by:
positionin interfaceElfByteChannel- Throws:
java.io.IOException
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException- Specified by:
readin interfaceElfByteChannel- Specified by:
readin interfacejava.nio.channels.ReadableByteChannel- Throws:
java.io.IOException
-
read
public int read(java.nio.ByteBuffer dst, long position) throws java.io.IOException- Specified by:
readin interfaceElfByteChannel- Throws:
java.io.IOException
-
size
public long size() throws java.io.IOException- Specified by:
sizein interfaceElfByteChannel- Throws:
java.io.IOException
-
truncate
public ElfByteChannel truncate(long size) throws java.io.IOException
- Specified by:
truncatein interfaceElfByteChannel- Throws:
java.io.IOException
-
write
public int write(java.nio.ByteBuffer src) throws java.io.IOException- Specified by:
writein interfaceElfByteChannel- Specified by:
writein interfacejava.nio.channels.WritableByteChannel- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.nio.channels.Channel- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfacejava.nio.channels.Channel
-
-