Top Description Fields Constructors Methods
org.jboss.marshalling

public Class OutputStreamByteOutput

extends FilterOutputStream
implements ByteOutput
Class Inheritance
All Implemented Interfaces
org.jboss.marshalling.ByteOutput, java.io.Flushable, java.io.Closeable, java.lang.AutoCloseable
Imports
java.io.FilterOutputStream, .IOException, .OutputStream

An OutputStream which implements ByteInput and reads data from another OutputStream. Usually the Marshalling#createByteOutput(java.nio.ByteBuffer) method should be used to create instances because it can detect when the target already extends OutputStream.

Field Summary

Inherited from java.io.FilterOutputStream:
out

Constructor Summary

AccessConstructor and Description
public
OutputStreamByteOutput(final OutputStream
the output stream to write to
outputStream
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public void
write(final byte[]
the data
b
,
final int
the start offset in the data
off
,
final int
the number of bytes to write
len
)

Overrides java.io.FilterOutputStream.write.

Implements org.jboss.marshalling.ByteOutput.write.

Writes len bytes from the specified byte array starting at offset off to this output stream.
Inherited from java.io.FilterOutputStream:
closeflushwritewrite

Constructor Detail

OutputStreamByteOutputback to summary
public OutputStreamByteOutput(final OutputStream outputStream)

Construct a new instance.

Parameters
outputStream:OutputStream

the output stream to write to

Method Detail

writeback to summary
public void write(final byte[] b, final int off, final int len) throws IOException

Overrides java.io.FilterOutputStream.write.

Implements org.jboss.marshalling.ByteOutput.write.

Writes len bytes from the specified byte array starting at offset off to this output stream.

Parameters
b:byte[]

the data

off:int

the start offset in the data

len:int

the number of bytes to write

Exceptions
IOException:
if an I/O error occurs