java.lang.Object |
↳ |
com.pnfsoftware.jeb.util.io.SubSeekableByteChannel |
Class Overview
An seekable channel presenting a region of another seekable channel. Only read-operations are
supported. Attempts to write or modify the master channel will raise an IOException.
Summary
Public Constructors |
|
SubSeekableByteChannel(SeekableByteChannel channel, long base, long maxsize)
Create a sub channel.
|
Public Methods |
void
|
close()
Close this sub-channel and its master channel.
|
boolean
|
isOpen()
|
long
|
position()
|
SeekableByteChannel
|
position(long newPosition)
|
int
|
read(ByteBuffer dst)
|
long
|
size()
|
SeekableByteChannel
|
truncate(long size)
|
int
|
write(ByteBuffer src)
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
From interface
java.io.Closeable
|
From interface
java.lang.AutoCloseable
|
From interface
java.nio.channels.Channel
abstract
void
|
close()
|
abstract
boolean
|
isOpen()
|
|
From interface
java.nio.channels.ReadableByteChannel
abstract
int
|
read(ByteBuffer arg0)
|
|
From interface
java.nio.channels.SeekableByteChannel
abstract
long
|
position()
|
abstract
SeekableByteChannel
|
position(long arg0)
|
abstract
int
|
read(ByteBuffer arg0)
|
abstract
long
|
size()
|
abstract
SeekableByteChannel
|
truncate(long arg0)
|
abstract
int
|
write(ByteBuffer arg0)
|
|
From interface
java.nio.channels.WritableByteChannel
abstract
int
|
write(ByteBuffer arg0)
|
|
Public Constructors
public
SubSeekableByteChannel
(SeekableByteChannel channel, long base, long maxsize)
Parameters
channel |
the main channel |
base |
beginning of region |
maxsize |
size of region |
Public Methods
public
void
close
()
Close this sub-channel and its master channel.
public
SeekableByteChannel
position
(long newPosition)
public
int
read
(ByteBuffer dst)
public
SeekableByteChannel
truncate
(long size)
public
int
write
(ByteBuffer src)