Class RandomAccessOutputStream
java.lang.Object
java.io.OutputStream
org.apache.commons.compress.archivers.zip.RandomAccessOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Direct Known Subclasses:
FileRandomAccessOutputStream,SeekableChannelRandomAccessOutputStream,ZipSplitOutputStream
Abstraction over OutputStream which also allows random access writes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract longposition()Gets the current position in this stream.voidwrite(int b) (package private) abstract voidwriteAll(byte[] bytes, int offset, int len, long position) Writes all given bytes at a position.(package private) voidwriteAll(byte[] bytes, long position) Writes all given bytes at a position.Methods inherited from class java.io.OutputStream
close, flush, write, write
-
Constructor Details
-
RandomAccessOutputStream
RandomAccessOutputStream()
-
-
Method Details
-
position
Gets the current position in this stream.- Returns:
- current position.
- Throws:
IOException- if an I/O error occurs
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
writeAll
Writes all given bytes at a position.- Parameters:
bytes- data to writeoffset- offset of the start of data in param byteslen- the length of data to writeposition- position in the stream- Throws:
IOException- if an I/O error occurs.
-
writeAll
Writes all given bytes at a position.- Parameters:
bytes- data to writeposition- position in the stream- Throws:
IOException- if an I/O error occurs.
-