java.lang.Object
java.nio.channels.spi.AbstractInterruptibleChannel
org.jruby.util.io.SeekableByteChannelImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,InterruptibleChannel,ReadableByteChannel,SeekableByteChannel,WritableByteChannel
public final class SeekableByteChannelImpl
extends AbstractInterruptibleChannel
implements ReadableByteChannel, SeekableByteChannel
Seekable byte channel impl over a byte array stream.
- Author:
- kares
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidlongposition()position(long newPosition) intread(ByteBuffer target) longsize()truncate(long size) intwrite(ByteBuffer src) Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
-
Constructor Details
-
SeekableByteChannelImpl
-
-
Method Details
-
read
- Specified by:
readin interfaceReadableByteChannel- Specified by:
readin interfaceSeekableByteChannel- Throws:
IOException
-
implCloseChannel
- Specified by:
implCloseChannelin classAbstractInterruptibleChannel- Throws:
IOException
-
position
public long position()- Specified by:
positionin interfaceSeekableByteChannel
-
position
- Specified by:
positionin interfaceSeekableByteChannel- Throws:
IOException
-
size
public long size()- Specified by:
sizein interfaceSeekableByteChannel
-
truncate
- Specified by:
truncatein interfaceSeekableByteChannel- Throws:
IOException
-
write
- Specified by:
writein interfaceSeekableByteChannel- Specified by:
writein interfaceWritableByteChannel- Throws:
IOException
-