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 Output
An Output lets an application write primitive data types and objects to a sink of data.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
writeBool
(int fieldNumber, boolean value, boolean repeated) Writes a boolean field.void
writeByteArray
(int fieldNumber, byte[] value, boolean repeated) Writes a byte array field.void
writeByteRange
(boolean utf8String, int fieldNumber, byte[] value, int offset, int length, boolean repeated) Writes a binary or a pre-encoded utf8 string.void
writeBytes
(int fieldNumber, ByteString value, boolean repeated) Writes a ByteString(wraps byte array) field.void
writeBytes
(int fieldNumber, ByteBuffer value, boolean repeated) void
writeDouble
(int fieldNumber, double value, boolean repeated) Writes a double field.void
writeEnum
(int fieldNumber, int value, boolean repeated) Writes a enum(its number) field.void
writeFixed32
(int fieldNumber, int value, boolean repeated) Writes a fixed int(4 bytes) field.void
writeFixed64
(int fieldNumber, long value, boolean repeated) Writes a fixed long(8 bytes) field.void
writeFloat
(int fieldNumber, float value, boolean repeated) Writes a float field.void
writeInt32
(int fieldNumber, int value, boolean repeated) Writes a variable int field.void
writeInt64
(int fieldNumber, long value, boolean repeated) Writes a variable long field.<T> void
writeObject
(int fieldNumber, T value, Schema<T> schema, boolean repeated) Writes an object(using its schema) field.void
writeSFixed32
(int fieldNumber, int value, boolean repeated) Writes a signed+fixed int(4 bytes) field.void
writeSFixed64
(int fieldNumber, long value, boolean repeated) Writes a signed+fixed long(8 bytes) field.void
writeSInt32
(int fieldNumber, int value, boolean repeated) Writes a signed int field.void
writeSInt64
(int fieldNumber, long value, boolean repeated) Writes a signed long field.void
writeString
(int fieldNumber, CharSequence value, boolean repeated) Writes a String field.void
writeUInt32
(int fieldNumber, int value, boolean repeated) Writes an unsigned int field.void
writeUInt64
(int fieldNumber, long value, boolean repeated) Writes an unsigned long field.
-
Method Details
-
writeInt32
Writes a variable int field.- Throws:
IOException
-
writeUInt32
Writes an unsigned int field.- Throws:
IOException
-
writeSInt32
Writes a signed int field.- Throws:
IOException
-
writeFixed32
Writes a fixed int(4 bytes) field.- Throws:
IOException
-
writeSFixed32
Writes a signed+fixed int(4 bytes) field.- Throws:
IOException
-
writeInt64
Writes a variable long field.- Throws:
IOException
-
writeUInt64
Writes an unsigned long field.- Throws:
IOException
-
writeSInt64
Writes a signed long field.- Throws:
IOException
-
writeFixed64
Writes a fixed long(8 bytes) field.- Throws:
IOException
-
writeSFixed64
Writes a signed+fixed long(8 bytes) field.- Throws:
IOException
-
writeFloat
Writes a float field.- Throws:
IOException
-
writeDouble
Writes a double field.- Throws:
IOException
-
writeBool
Writes a boolean field.- Throws:
IOException
-
writeEnum
Writes a enum(its number) field.- Throws:
IOException
-
writeString
Writes a String field.- Throws:
IOException
-
writeBytes
Writes a ByteString(wraps byte array) field.- Throws:
IOException
-
writeByteArray
Writes a byte array field.- Throws:
IOException
-
writeByteRange
void writeByteRange(boolean utf8String, int fieldNumber, byte[] value, int offset, int length, boolean repeated) throws IOException Writes a binary or a pre-encoded utf8 string.- Throws:
IOException
-
writeObject
<T> void writeObject(int fieldNumber, T value, Schema<T> schema, boolean repeated) throws IOException Writes an object(using its schema) field.- Throws:
IOException
-
writeBytes
- Throws:
IOException
-