Top Description Constructors Methods
org.apache.commons.compress.archivers.zip

pack-priv abstract Class RandomAccessOutputStream

extends OutputStream
Class Inheritance
Known Direct Subclasses
org.apache.commons.compress.archivers.zip.SeekableChannelRandomAccessOutputStream, org.apache.commons.compress.archivers.zip.ZipSplitOutputStream, org.apache.commons.compress.archivers.zip.FileRandomAccessOutputStream
Imports
java.io.IOException, .OutputStream

Abstraction over OutputStream which also allows random access writes.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public abstract long

Returns:

current position.
position
()

Provides current position in output.

public void
write(final int
the byte.
b
)

Implements abstract java.io.OutputStream.write.

Writes the specified byte to this output stream.
pack-priv abstract void
writeFully(byte[]
data to write
b
,
int
offset of the start of data in param b
off
,
int
the length of data to write
len
,
long
position in the stream
position
)

Writes given data to specific position.

public void
writeFully(final byte[]
data to write
b
,
final long
position in the stream
position
)

Writes given data to specific position.

Inherited from java.io.OutputStream:
closeflushnullOutputStreamwritewrite

Constructor Detail

RandomAccessOutputStreamback to summary
pack-priv RandomAccessOutputStream()

Method Detail

positionback to summary
public abstract long position() throws IOException

Provides current position in output.

Returns:long

current position.

Exceptions
IOException:
if an I/O error occurs
writeback to summary
public void write(final int b) throws IOException

Implements abstract java.io.OutputStream.write.

Doc from java.io.OutputStream.write.

Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.

Parameters
b:int

the byte.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
writeFullyback to summary
pack-priv abstract void writeFully(byte[] b, int off, int len, long position) throws IOException

Writes given data to specific position.

Parameters
b:byte[]

data to write

off:int

offset of the start of data in param b

len:int

the length of data to write

position:long

position in the stream

Exceptions
IOException:
if an I/O error occurs.
writeFullyback to summary
public void writeFully(final byte[] b, final long position) throws IOException

Writes given data to specific position.

Parameters
b:byte[]

data to write

position:long

position in the stream

Exceptions
IOException:
if an I/O error occurs.