
public class ByteOutputStream extends SimpleByteOutput
OutputStream which implements ByteOutput and writes bytes to another ByteOutput.
Usually the Marshalling.createByteOutput(OutputStream) method should be used to create instances because
it can detect when the target already implements ByteOutput.| Modifier and Type | Field and Description |
|---|---|
protected ByteOutput |
byteOutput |
| Constructor and Description |
|---|
ByteOutputStream(ByteOutput byteOutput)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
write(byte[] b)
Write all the bytes from the given array to the stream.
|
void |
write(byte[] b,
int off,
int len)
Write some of the bytes from the given array to the stream.
|
void |
write(int b)
Writes to the output stream the eight low-order bits of the argument
b. |
protected volatile ByteOutput byteOutput
public ByteOutputStream(ByteOutput byteOutput)
byteOutput - the byte output to write topublic void write(int b)
throws java.io.IOException
b. The 24 high-order bits of
b are ignored.write in interface ByteOutputwrite in class java.io.OutputStreamb - the byte to writejava.io.IOException - if an error occurspublic void write(byte[] b)
throws java.io.IOException
write in interface ByteOutputwrite in class java.io.OutputStreamb - the byte arrayjava.io.IOException - if an error occurspublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in interface ByteOutputwrite in class java.io.OutputStreamb - the byte arrayoff - the index to start writing fromlen - the number of bytes to writejava.io.IOException - if an error occurspublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionCopyright © 2011 JBoss, a division of Red Hat, Inc.