Class RandomAccessOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.commons.compress.archivers.zip.RandomAccessOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
- Direct Known Subclasses:
FileRandomAccessOutputStream,SeekableChannelRandomAccessOutputStream,ZipSplitOutputStream
abstract class RandomAccessOutputStream extends java.io.OutputStreamAbstraction over OutputStream which also allows random access writes.
-
-
Constructor Summary
Constructors Constructor Description RandomAccessOutputStream()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract 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.
-
-
-
Method Detail
-
position
public abstract long position() throws java.io.IOExceptionProvides current position in output.- Returns:
- current position.
- Throws:
java.io.IOException- if an I/O error occurs
-
write
public void write(int b) throws java.io.IOException- Specified by:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
writeFully
abstract void writeFully(byte[] b, int off, int len, long position) throws java.io.IOExceptionWrites given data to specific position.- Parameters:
position- position in the streamb- data to writeoff- offset of the start of data in param blen- the length of data to write- Throws:
java.io.IOException- if an I/O error occurs.
-
writeFully
public void writeFully(byte[] b, long position) throws java.io.IOExceptionWrites given data to specific position.- Parameters:
position- position in the streamb- data to write- Throws:
java.io.IOException- if an I/O error occurs.
-
-