public static final class ByteString.Output
extends java.io.OutputStream
Modifier and Type | Method and Description |
---|---|
void |
reset()
Resets this stream, so that all currently accumulated output in the
output stream is discarded.
|
int |
size()
Returns the current size of the output stream.
|
ByteString |
toByteString()
Creates a byte string.
|
java.lang.String |
toString() |
void |
write(byte[] b,
int offset,
int length) |
void |
write(int b) |
void |
writeTo(java.io.OutputStream out)
Writes the complete contents of this byte array output stream to
the specified output stream argument.
|
public void write(int b)
write
in class java.io.OutputStream
public void write(byte[] b, int offset, int length)
write
in class java.io.OutputStream
public ByteString toByteString()
public void writeTo(java.io.OutputStream out) throws java.io.IOException
out
- the output stream to which to write the data.java.io.IOException
- if an I/O error occurs.public int size()
public void reset()
public java.lang.String toString()
toString
in class java.lang.Object