public static final class ByteString.Output extends 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 with the size and contents of this output stream.
|
String |
toString() |
void |
write(byte[] b,
int offset,
int length) |
void |
write(int b) |
void |
writeTo(OutputStream out)
Writes the complete contents of this byte array output stream to the specified output stream
argument.
|
close, flush, writepublic void write(int b)
write in class OutputStreampublic void write(byte[] b,
int offset,
int length)
write in class OutputStreampublic ByteString toByteString()
ByteString.Output. If the stream size
stays within the initial capacity, the runtime is O(1).public void writeTo(OutputStream out) throws IOException
out - the output stream to which to write the data.IOException - if an I/O error occurs.public int size()
public void reset()
Copyright © 2008–2022. All rights reserved.