Package htsjdk.samtools.seekablestream
Class ReadableSeekableStreamByteChannel
java.lang.Object
htsjdk.samtools.seekablestream.ReadableSeekableStreamByteChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,ReadableByteChannel,SeekableByteChannel,WritableByteChannel
A class to wrap a
SeekableStream in a read-only SeekableByteChannel.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanisOpen()longposition()position(long newPosition) intread(ByteBuffer dst) longsize()truncate(long size) intwrite(ByteBuffer src)
-
Constructor Details
-
ReadableSeekableStreamByteChannel
-
-
Method Details
-
read
- Specified by:
readin interfaceReadableByteChannel- Specified by:
readin interfaceSeekableByteChannel- Throws:
IOException
-
write
- Specified by:
writein interfaceSeekableByteChannel- Specified by:
writein interfaceWritableByteChannel- 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
-
isOpen
public boolean isOpen() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-