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 TypeMethodDescriptionvoid
close()
long
position()
Provides current position in output.void
write
(byte[] b, int off, int len) void
writeFully
(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, writeFully
Methods inherited from class java.io.OutputStream
flush, write
-
Field Details
-
channel
-
-
Constructor Details
-
SeekableChannelRandomAccessOutputStream
SeekableChannelRandomAccessOutputStream(SeekableByteChannel channel)
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
position
Description copied from class:RandomAccessOutputStream
Provides current position in output.- Specified by:
position
in classRandomAccessOutputStream
- Returns:
- current position.
- Throws:
IOException
- if an I/O error occurs
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
writeFully
Description copied from class:RandomAccessOutputStream
Writes given data to specific position.- Specified by:
writeFully
in 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.
-