public class ReadableSeekableStreamByteChannel
extends java.lang.Object
implements java.nio.channels.SeekableByteChannel
SeekableStream
in a read-only SeekableByteChannel
.Constructor and Description |
---|
ReadableSeekableStreamByteChannel(SeekableStream seekableStream) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
isOpen() |
long |
position() |
java.nio.channels.SeekableByteChannel |
position(long newPosition) |
int |
read(java.nio.ByteBuffer dst) |
long |
size() |
java.nio.channels.SeekableByteChannel |
truncate(long size) |
int |
write(java.nio.ByteBuffer src) |
public ReadableSeekableStreamByteChannel(SeekableStream seekableStream)
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
read
in interface java.nio.channels.ReadableByteChannel
read
in interface java.nio.channels.SeekableByteChannel
java.io.IOException
public int write(java.nio.ByteBuffer src) throws java.io.IOException
write
in interface java.nio.channels.SeekableByteChannel
write
in interface java.nio.channels.WritableByteChannel
java.io.IOException
public long position()
position
in interface java.nio.channels.SeekableByteChannel
public java.nio.channels.SeekableByteChannel position(long newPosition) throws java.io.IOException
position
in interface java.nio.channels.SeekableByteChannel
java.io.IOException
public long size()
size
in interface java.nio.channels.SeekableByteChannel
public java.nio.channels.SeekableByteChannel truncate(long size)
truncate
in interface java.nio.channels.SeekableByteChannel
public boolean isOpen()
isOpen
in interface java.nio.channels.Channel
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface java.nio.channels.Channel
java.io.IOException