Package akka.protobuf
Class ByteString.Output
- java.lang.Object
- 
- java.io.OutputStream
- 
- akka.protobuf.ByteString.Output
 
 
- 
- All Implemented Interfaces:
- java.io.Closeable,- java.io.Flushable,- java.lang.AutoCloseable
 - Enclosing class:
- ByteString
 
 public static final class ByteString.Output extends java.io.OutputStream
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreset()Resets this stream, so that all currently accumulated output in the output stream is discarded.intsize()Returns the current size of the output stream.ByteStringtoByteString()Creates a byte string.java.lang.StringtoString()voidwrite(byte[] b, int offset, int length)voidwrite(int b)voidwriteTo(java.io.OutputStream out)Writes the complete contents of this byte array output stream to the specified output stream argument.
 
- 
- 
- 
Method Detail- 
writepublic void write(int b) - Specified by:
- writein class- java.io.OutputStream
 
 - 
writepublic void write(byte[] b, int offset, int length)- Overrides:
- writein class- java.io.OutputStream
 
 - 
toByteStringpublic ByteString toByteString() Creates a byte string. Its size is the current size of this output stream and its output has been copied to it.- Returns:
- the current contents of this output stream, as a byte string.
 
 - 
writeTopublic void writeTo(java.io.OutputStream out) throws java.io.IOExceptionWrites the complete contents of this byte array output stream to the specified output stream argument.- Parameters:
- out- the output stream to which to write the data.
- Throws:
- java.io.IOException- if an I/O error occurs.
 
 - 
sizepublic int size() Returns the current size of the output stream.- Returns:
- the current size of the output stream
 
 - 
resetpublic void reset() Resets this stream, so that all currently accumulated output in the output stream is discarded. The output stream can be used again, reusing the already allocated buffer space.
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-