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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
isOpen()
long
position()
position
(long newPosition) int
read
(ByteBuffer dst) long
size()
truncate
(long size) int
write
(ByteBuffer src)
-
Constructor Details
-
ReadableSeekableStreamByteChannel
-
-
Method Details
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Specified by:
read
in interfaceSeekableByteChannel
- Throws:
IOException
-
write
- Specified by:
write
in interfaceSeekableByteChannel
- Specified by:
write
in interfaceWritableByteChannel
- Throws:
IOException
-
position
public long position()- Specified by:
position
in interfaceSeekableByteChannel
-
position
- Specified by:
position
in interfaceSeekableByteChannel
- Throws:
IOException
-
size
public long size()- Specified by:
size
in interfaceSeekableByteChannel
-
truncate
- Specified by:
truncate
in interfaceSeekableByteChannel
-
isOpen
public boolean isOpen() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-