Package org.jboss.marshalling
Class OutputStreamByteOutput
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.jboss.marshalling.OutputStreamByteOutput
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,ByteOutput
public class OutputStreamByteOutput extends FilterOutputStream implements ByteOutput
AnOutputStream
which implementsByteInput
and reads data from anotherOutputStream
. Usually theMarshalling.createByteOutput(java.nio.ByteBuffer)
method should be used to create instances because it can detect when the target already extendsOutputStream
.
-
-
Field Summary
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description OutputStreamByteOutput(OutputStream outputStream)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(byte[] b, int off, int len)
Writeslen
bytes from the specifiedbyte
array starting at offsetoff
to this output stream.-
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.marshalling.ByteOutput
write, write
-
-
-
-
Constructor Detail
-
OutputStreamByteOutput
public OutputStreamByteOutput(OutputStream outputStream)
Construct a new instance.- Parameters:
outputStream
- the output stream to write to
-
-
Method Detail
-
write
public void write(byte[] b, int off, int len) throws IOException
Writeslen
bytes from the specifiedbyte
array starting at offsetoff
to this output stream.- Specified by:
write
in interfaceByteOutput
- Overrides:
write
in classFilterOutputStream
- Parameters:
b
- the dataoff
- the start offset in the datalen
- the number of bytes to write- Throws:
IOException
- if an I/O error occurs
-
-