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 TypeMethodDescriptionabstract longposition()Provides current position in output.voidwrite(int b) (package private) abstract voidwriteFully(byte[] b, int off, int len, long position) Writes given data to specific position.voidwriteFully(byte[] b, long position) Writes given data to specific position.Methods inherited from class java.io.OutputStream
close, flush, write, write
-
Constructor Details
-
RandomAccessOutputStream
RandomAccessOutputStream()
-
-
Method Details
-
position
Provides current position in output.- Returns:
- current position.
- Throws:
IOException- if an I/O error occurs
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
writeFully
Writes given data to specific position.- Parameters:
b- data to writeoff- offset of the start of data in param blen- the length of data to writeposition- position in the stream- Throws:
IOException- if an I/O error occurs.
-
writeFully
Writes given data to specific position.- Parameters:
b- data to writeposition- position in the stream- Throws:
IOException- if an I/O error occurs.
-