Class SeekableChannelRandomAccessOutputStream
java.lang.Object
java.io.OutputStream
org.apache.commons.compress.archivers.zip.RandomAccessOutputStream
org.apache.commons.compress.archivers.zip.SeekableChannelRandomAccessOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
RandomAccessOutputStream implementation for SeekableByteChannel.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longposition()Provides current position in output.voidwrite(byte[] b, int off, int len) voidwriteFully(byte[] b, int off, int len, long position) Writes given data to specific position.Methods inherited from class org.apache.commons.compress.archivers.zip.RandomAccessOutputStream
write, writeFullyMethods inherited from class java.io.OutputStream
flush, write
-
Field Details
-
channel
-
-
Constructor Details
-
SeekableChannelRandomAccessOutputStream
SeekableChannelRandomAccessOutputStream(SeekableByteChannel channel)
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
position
Description copied from class:RandomAccessOutputStreamProvides current position in output.- Specified by:
positionin classRandomAccessOutputStream- Returns:
- current position.
- Throws:
IOException- if an I/O error occurs
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
writeFully
Description copied from class:RandomAccessOutputStreamWrites given data to specific position.- Specified by:
writeFullyin classRandomAccessOutputStream- 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.
-