Module kala.compress.archivers.zip
Package kala.compress.archivers.zip
Class SeekableChannelRandomAccessOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- kala.compress.archivers.zip.RandomAccessOutputStream
-
- kala.compress.archivers.zip.SeekableChannelRandomAccessOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
class SeekableChannelRandomAccessOutputStream extends RandomAccessOutputStream
RandomAccessOutputStreamimplementation for SeekableByteChannel.
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.channels.SeekableByteChannelchannel
-
Constructor Summary
Constructors Constructor Description SeekableChannelRandomAccessOutputStream(java.nio.channels.SeekableByteChannel channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()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 kala.compress.archivers.zip.RandomAccessOutputStream
write, writeFully
-
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.OutputStream- Throws:
java.io.IOException
-
position
public long position() throws java.io.IOExceptionDescription copied from class:RandomAccessOutputStreamProvides current position in output.- Specified by:
positionin classRandomAccessOutputStream- Returns:
- current position.
- Throws:
java.io.IOException- if an I/O error occurs
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException- Overrides:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
writeFully
public void writeFully(byte[] b, int off, int len, long position) throws java.io.IOExceptionDescription 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:
java.io.IOException- if an I/O error occurs.
-
-