Package htsjdk.samtools.util
Class PositionalOutputStream
java.lang.Object
java.io.OutputStream
htsjdk.samtools.util.PositionalOutputStream
- All Implemented Interfaces:
LocationAware,Closeable,Flushable,AutoCloseable
Wraps output stream in a manner which keeps track of the position within the file and allowing writes
at arbitrary points
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
Constructor Details
-
PositionalOutputStream
-
-
Method Details
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
getPosition
public final long getPosition()Description copied from interface:LocationAwareThe current offset, in bytes, of this stream/writer/file. Or, if this is an iterator/producer, the offset (in bytes) of the END of the most recently returned record (since a produced record corresponds to something that has been read already). See class javadoc for more. Note that for BGZF files, this does not represent an actually file position, but a virtual file pointer.- Specified by:
getPositionin interfaceLocationAware
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-