Package io.protostuff
Interface Output
-
- All Known Subinterfaces:
StatefulOutput
- All Known Implementing Classes:
FilterOutput,GraphProtostuffOutput,JsonOutput,JsonXOutput,KvpOutput,LowCopyProtobufOutput,LowCopyProtostuffOutput,ProtobufOutput,ProtostuffOutput,XmlOutput,XmlXOutput,YamlOutput
public interface OutputAn Output lets an application write primitive data types and objects to a sink of data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidwriteBool(int fieldNumber, boolean value, boolean repeated)Writes a boolean field.voidwriteByteArray(int fieldNumber, byte[] value, boolean repeated)Writes a byte array field.voidwriteByteRange(boolean utf8String, int fieldNumber, byte[] value, int offset, int length, boolean repeated)Writes a binary or a pre-encoded utf8 string.voidwriteBytes(int fieldNumber, ByteString value, boolean repeated)Writes a ByteString(wraps byte array) field.voidwriteBytes(int fieldNumber, java.nio.ByteBuffer value, boolean repeated)voidwriteDouble(int fieldNumber, double value, boolean repeated)Writes a double field.voidwriteEnum(int fieldNumber, int value, boolean repeated)Writes a enum(its number) field.voidwriteFixed32(int fieldNumber, int value, boolean repeated)Writes a fixed int(4 bytes) field.voidwriteFixed64(int fieldNumber, long value, boolean repeated)Writes a fixed long(8 bytes) field.voidwriteFloat(int fieldNumber, float value, boolean repeated)Writes a float field.voidwriteInt32(int fieldNumber, int value, boolean repeated)Writes a variable int field.voidwriteInt64(int fieldNumber, long value, boolean repeated)Writes a variable long field.<T> voidwriteObject(int fieldNumber, T value, Schema<T> schema, boolean repeated)Writes an object(using its schema) field.voidwriteSFixed32(int fieldNumber, int value, boolean repeated)Writes a signed+fixed int(4 bytes) field.voidwriteSFixed64(int fieldNumber, long value, boolean repeated)Writes a signed+fixed long(8 bytes) field.voidwriteSInt32(int fieldNumber, int value, boolean repeated)Writes a signed int field.voidwriteSInt64(int fieldNumber, long value, boolean repeated)Writes a signed long field.voidwriteString(int fieldNumber, java.lang.CharSequence value, boolean repeated)Writes a String field.voidwriteUInt32(int fieldNumber, int value, boolean repeated)Writes an unsigned int field.voidwriteUInt64(int fieldNumber, long value, boolean repeated)Writes an unsigned long field.
-
-
-
Method Detail
-
writeInt32
void writeInt32(int fieldNumber, int value, boolean repeated) throws java.io.IOExceptionWrites a variable int field.- Throws:
java.io.IOException
-
writeUInt32
void writeUInt32(int fieldNumber, int value, boolean repeated) throws java.io.IOExceptionWrites an unsigned int field.- Throws:
java.io.IOException
-
writeSInt32
void writeSInt32(int fieldNumber, int value, boolean repeated) throws java.io.IOExceptionWrites a signed int field.- Throws:
java.io.IOException
-
writeFixed32
void writeFixed32(int fieldNumber, int value, boolean repeated) throws java.io.IOExceptionWrites a fixed int(4 bytes) field.- Throws:
java.io.IOException
-
writeSFixed32
void writeSFixed32(int fieldNumber, int value, boolean repeated) throws java.io.IOExceptionWrites a signed+fixed int(4 bytes) field.- Throws:
java.io.IOException
-
writeInt64
void writeInt64(int fieldNumber, long value, boolean repeated) throws java.io.IOExceptionWrites a variable long field.- Throws:
java.io.IOException
-
writeUInt64
void writeUInt64(int fieldNumber, long value, boolean repeated) throws java.io.IOExceptionWrites an unsigned long field.- Throws:
java.io.IOException
-
writeSInt64
void writeSInt64(int fieldNumber, long value, boolean repeated) throws java.io.IOExceptionWrites a signed long field.- Throws:
java.io.IOException
-
writeFixed64
void writeFixed64(int fieldNumber, long value, boolean repeated) throws java.io.IOExceptionWrites a fixed long(8 bytes) field.- Throws:
java.io.IOException
-
writeSFixed64
void writeSFixed64(int fieldNumber, long value, boolean repeated) throws java.io.IOExceptionWrites a signed+fixed long(8 bytes) field.- Throws:
java.io.IOException
-
writeFloat
void writeFloat(int fieldNumber, float value, boolean repeated) throws java.io.IOExceptionWrites a float field.- Throws:
java.io.IOException
-
writeDouble
void writeDouble(int fieldNumber, double value, boolean repeated) throws java.io.IOExceptionWrites a double field.- Throws:
java.io.IOException
-
writeBool
void writeBool(int fieldNumber, boolean value, boolean repeated) throws java.io.IOExceptionWrites a boolean field.- Throws:
java.io.IOException
-
writeEnum
void writeEnum(int fieldNumber, int value, boolean repeated) throws java.io.IOExceptionWrites a enum(its number) field.- Throws:
java.io.IOException
-
writeString
void writeString(int fieldNumber, java.lang.CharSequence value, boolean repeated) throws java.io.IOExceptionWrites a String field.- Throws:
java.io.IOException
-
writeBytes
void writeBytes(int fieldNumber, ByteString value, boolean repeated) throws java.io.IOExceptionWrites a ByteString(wraps byte array) field.- Throws:
java.io.IOException
-
writeByteArray
void writeByteArray(int fieldNumber, byte[] value, boolean repeated) throws java.io.IOExceptionWrites a byte array field.- Throws:
java.io.IOException
-
writeByteRange
void writeByteRange(boolean utf8String, int fieldNumber, byte[] value, int offset, int length, boolean repeated) throws java.io.IOExceptionWrites a binary or a pre-encoded utf8 string.- Throws:
java.io.IOException
-
writeObject
<T> void writeObject(int fieldNumber, T value, Schema<T> schema, boolean repeated) throws java.io.IOExceptionWrites an object(using its schema) field.- Throws:
java.io.IOException
-
writeBytes
void writeBytes(int fieldNumber, java.nio.ByteBuffer value, boolean repeated) throws java.io.IOException- Throws:
java.io.IOException
-
-