public class BinaryWriter extends Object
Modifier and Type | Field and Description |
---|---|
(package private) OutputStream |
os |
(package private) ByteArrayOutputStream |
stream |
(package private) com.google.protobuf.CodedOutputStream |
writer |
Constructor and Description |
---|
BinaryWriter() |
BinaryWriter(ByteArrayOutputStream stream) |
BinaryWriter(int size) |
BinaryWriter(OutputStream outputStream) |
Modifier and Type | Method and Description |
---|---|
void |
flush() |
com.google.protobuf.CodedOutputStream |
getStream() |
byte[] |
toByteArray() |
void |
write(byte data) |
void |
write(byte[] data) |
void |
write(int data) |
void |
write(long data) |
void |
write(short data) |
void |
writeR(ByteBuffer buffer) |
com.google.protobuf.CodedOutputStream writer
OutputStream os
ByteArrayOutputStream stream
public BinaryWriter(ByteArrayOutputStream stream)
public BinaryWriter(int size)
public BinaryWriter()
public BinaryWriter(OutputStream outputStream)
public void write(short data) throws IOException
IOException
public void write(int data) throws IOException
IOException
public void write(long data) throws IOException
IOException
public byte[] toByteArray()
public void writeR(ByteBuffer buffer) throws IOException
IOException
public void write(byte[] data) throws IOException
IOException
public void write(byte data) throws IOException
IOException
public com.google.protobuf.CodedOutputStream getStream()
public void flush()
Copyright © 2012. All Rights Reserved.