public interface OutputEx
Forked and modified from protostuff
difference for scalar types:
OutputEx OutputEx
writeXXX all scenes repeated not packed, write with tag, not ignore default value
writePackedXXX --- repeated packed, write without tag, not ignore default value
writeScalarXXX --- not repeated field, not write default value
An OutputEx lets an application write primitive data types and objects to a sink of data.| Modifier and Type | Method and Description |
|---|---|
byte[] |
toByteArray() |
void |
writeBool(int tag,
int tagSize,
boolean value)
Writes a boolean field.
|
void |
writeByteArray(int tag,
int tagSize,
byte[] value)
Writes a byte array field.
|
void |
writeByteRange(boolean utf8String,
int tag,
int tagSize,
byte[] value,
int offset,
int length)
Writes a binary or a pre-encoded utf8 string.
|
void |
writeBytes(int tag,
int tagSize,
ByteBuffer value) |
void |
writeBytes(int tag,
int tagSize,
io.protostuff.ByteString value)
Writes a ByteString(wraps byte array) field.
|
void |
writeDouble(int tag,
int tagSize,
double value)
Writes a double field.
|
void |
writeEnum(int tag,
int tagSize,
int value)
Writes a enum(its number) field.
|
void |
writeFixed32(int tag,
int tagSize,
int value)
Writes a fixed int(4 bytes) field.
|
void |
writeFixed64(int tag,
int tagSize,
long value)
Writes a fixed long(8 bytes) field.
|
void |
writeFloat(int tag,
int tagSize,
float value)
Writes a float field.
|
void |
writeInt32(int tag,
int tagSize,
int value)
Writes a variable int field.
|
void |
writeInt64(int tag,
int tagSize,
long value)
Writes a variable long field.
|
<T> void |
writeObject(int tag,
int tagSize,
T value,
SchemaWriter<T> schemaWriter)
Writes an object(using its schema) field.
|
void |
writePackedBool(boolean value) |
default void |
writePackedDouble(double value) |
default void |
writePackedEnum(int value) |
void |
writePackedFixed32(int value) |
void |
writePackedFixed64(long value) |
default void |
writePackedFloat(float value) |
void |
writePackedInt32(int value) |
default void |
writePackedInt64(long value) |
default void |
writePackedSFixed32(int value) |
default void |
writePackedSFixed64(long value) |
void |
writePackedSInt32(int value) |
default void |
writePackedSInt64(long value) |
void |
writePackedUInt32(int value) |
void |
writePackedUInt64(long value) |
void |
writeScalarBool(int tag,
int tagSize,
boolean value) |
void |
writeScalarDouble(int tag,
int tagSize,
double value) |
void |
writeScalarEnum(int tag,
int tagSize,
int value) |
void |
writeScalarFixed32(int tag,
int tagSize,
int value) |
void |
writeScalarFixed64(int tag,
int tagSize,
long value) |
void |
writeScalarFloat(int tag,
int tagSize,
float value) |
void |
writeScalarInt32(int tag,
int tagSize,
int value) |
void |
writeScalarInt64(int tag,
int tagSize,
long value) |
void |
writeScalarSFixed32(int tag,
int tagSize,
int value) |
void |
writeScalarSFixed64(int tag,
int tagSize,
long value) |
void |
writeScalarSInt32(int tag,
int tagSize,
int value) |
void |
writeScalarSInt64(int tag,
int tagSize,
long value) |
void |
writeScalarString(int tag,
int tagSize,
String value) |
void |
writeScalarUInt32(int tag,
int tagSize,
int value) |
void |
writeScalarUInt64(int tag,
int tagSize,
long value) |
void |
writeSFixed32(int tag,
int tagSize,
int value)
Writes a signed+fixed int(4 bytes) field.
|
void |
writeSFixed64(int tag,
int tagSize,
long value)
Writes a signed+fixed long(8 bytes) field.
|
void |
writeSInt32(int tag,
int tagSize,
int value)
Writes a signed int field.
|
void |
writeSInt64(int tag,
int tagSize,
long value)
Writes a signed long field.
|
void |
writeString(int tag,
int tagSize,
String value)
Writes a String field.
|
void |
writeUInt32(int tag,
int tagSize,
int value)
Writes an unsigned int field.
|
void |
writeUInt64(int tag,
int tagSize,
long value)
Writes an unsigned long field.
|
void writeInt32(int tag,
int tagSize,
int value)
throws IOException
IOExceptionvoid writeUInt32(int tag,
int tagSize,
int value)
throws IOException
IOExceptionvoid writeSInt32(int tag,
int tagSize,
int value)
throws IOException
IOExceptionvoid writeFixed32(int tag,
int tagSize,
int value)
throws IOException
IOExceptionvoid writeSFixed32(int tag,
int tagSize,
int value)
throws IOException
IOExceptionvoid writeInt64(int tag,
int tagSize,
long value)
throws IOException
IOExceptionvoid writeUInt64(int tag,
int tagSize,
long value)
throws IOException
IOExceptionvoid writeSInt64(int tag,
int tagSize,
long value)
throws IOException
IOExceptionvoid writeFixed64(int tag,
int tagSize,
long value)
throws IOException
IOExceptionvoid writeSFixed64(int tag,
int tagSize,
long value)
throws IOException
IOExceptionvoid writeFloat(int tag,
int tagSize,
float value)
throws IOException
IOExceptionvoid writeDouble(int tag,
int tagSize,
double value)
throws IOException
IOExceptionvoid writeBool(int tag,
int tagSize,
boolean value)
throws IOException
IOExceptionvoid writeEnum(int tag,
int tagSize,
int value)
throws IOException
IOExceptionvoid writeString(int tag,
int tagSize,
String value)
throws IOException
IOExceptionvoid writeBytes(int tag,
int tagSize,
io.protostuff.ByteString value)
throws IOException
IOExceptionvoid writeByteArray(int tag,
int tagSize,
byte[] value)
throws IOException
IOExceptionvoid writeByteRange(boolean utf8String,
int tag,
int tagSize,
byte[] value,
int offset,
int length)
throws IOException
IOException<T> void writeObject(int tag,
int tagSize,
T value,
SchemaWriter<T> schemaWriter)
throws IOException
IOExceptionvoid writeBytes(int tag,
int tagSize,
ByteBuffer value)
throws IOException
IOExceptionbyte[] toByteArray()
void writePackedInt32(int value)
throws IOException
IOExceptionvoid writeScalarInt32(int tag,
int tagSize,
int value)
throws IOException
IOExceptiondefault void writePackedInt64(long value)
throws IOException
IOExceptionvoid writeScalarInt64(int tag,
int tagSize,
long value)
throws IOException
IOExceptionvoid writePackedUInt32(int value)
throws IOException
IOExceptionvoid writeScalarUInt32(int tag,
int tagSize,
int value)
throws IOException
IOExceptionvoid writePackedUInt64(long value)
throws IOException
IOExceptionvoid writeScalarUInt64(int tag,
int tagSize,
long value)
throws IOException
IOExceptionvoid writePackedSInt32(int value)
throws IOException
IOExceptionvoid writeScalarSInt32(int tag,
int tagSize,
int value)
throws IOException
IOExceptiondefault void writePackedSInt64(long value)
throws IOException
IOExceptionvoid writeScalarSInt64(int tag,
int tagSize,
long value)
throws IOException
IOExceptionvoid writePackedFixed32(int value)
throws IOException
IOExceptionvoid writeScalarFixed32(int tag,
int tagSize,
int value)
throws IOException
IOExceptionvoid writePackedFixed64(long value)
throws IOException
IOExceptionvoid writeScalarFixed64(int tag,
int tagSize,
long value)
throws IOException
IOExceptiondefault void writePackedSFixed32(int value)
throws IOException
IOExceptionvoid writeScalarSFixed32(int tag,
int tagSize,
int value)
throws IOException
IOExceptiondefault void writePackedSFixed64(long value)
throws IOException
IOExceptionvoid writeScalarSFixed64(int tag,
int tagSize,
long value)
throws IOException
IOExceptiondefault void writePackedFloat(float value)
throws IOException
IOExceptionvoid writeScalarFloat(int tag,
int tagSize,
float value)
throws IOException
IOExceptiondefault void writePackedDouble(double value)
throws IOException
IOExceptionvoid writeScalarDouble(int tag,
int tagSize,
double value)
throws IOException
IOExceptionvoid writePackedBool(boolean value)
throws IOException
IOExceptionvoid writeScalarBool(int tag,
int tagSize,
boolean value)
throws IOException
IOExceptiondefault void writePackedEnum(int value)
throws IOException
IOExceptionvoid writeScalarEnum(int tag,
int tagSize,
int value)
throws IOException
IOExceptionvoid writeScalarString(int tag,
int tagSize,
String value)
throws IOException
IOExceptionCopyright © 2017–2019 The Apache Software Foundation. All rights reserved.