public class PBStreamWriter extends Object
List<YourProtocolBufferMessage> messages = getGPBMessages...
PBStreamWriter.writeToStream(out, messages); | Constructor and Description |
|---|
PBStreamWriter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
writeToStream(OutputStream out,
List<? extends com.google.protobuf.GeneratedMessage> messages)
Write GeneratedMessages to the given output stream.
|
static void |
writeToStream(OutputStream out,
List<? extends com.google.protobuf.GeneratedMessage> messages,
ByteOption byteOption)
Write GeneratedMessages to the given output stream,
and use the a specialized PBWireByteMarkerHelper to write the delimiters.
|
public static void writeToStream(OutputStream out, List<? extends com.google.protobuf.GeneratedMessage> messages) throws IOException
out - output stream being written tomessages - messages generated by Google's protocol bufferIOExceptionpublic static void writeToStream(OutputStream out, List<? extends com.google.protobuf.GeneratedMessage> messages, ByteOption byteOption) throws IOException
out - output stream being written tomessages - messages generated by Google's protocol bufferbyteOption - option to choose signed bytes or unsigned bytes when writing to stream. null results
in a default UNSIGNED.IOExceptionCopyright © 2017. All rights reserved.