Package org.infinispan.protostream
Interface MessageMarshaller.ProtoStreamWriter
-
- Enclosing interface:
- MessageMarshaller<T>
public static interface MessageMarshaller.ProtoStreamWriterA high-level interface for the wire encoding of a Protobuf stream that allows writing named (and typed) message fields.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ImmutableSerializationContextgetSerializationContext()During reading, a marshaller can obtain the currentImmutableSerializationContextand use it in order to access the schema or marshaller information.<E> voidwriteArray(String fieldName, E[] array, Class<? extends E> elementClass)voidwriteBoolean(String fieldName, boolean value)voidwriteBoolean(String fieldName, Boolean value)voidwriteBooleans(String fieldName, boolean[] values)voidwriteBytes(String fieldName, byte[] value)voidwriteBytes(String fieldName, InputStream input)<E> voidwriteCollection(String fieldName, Collection<? super E> collection, Class<E> elementClass)voidwriteDate(String fieldName, Date value)voidwriteDouble(String fieldName, double value)voidwriteDouble(String fieldName, Double value)voidwriteDoubles(String fieldName, double[] values)<E extends Enum<E>>
voidwriteEnum(String fieldName, E value)Writes an enum value.<E extends Enum<E>>
voidwriteEnum(String fieldName, E value, Class<E> clazz)Deprecated.replaced bywriteEnum(String fieldName, Enum value)voidwriteFloat(String fieldName, float value)voidwriteFloat(String fieldName, Float value)voidwriteFloats(String fieldName, float[] values)voidwriteInstant(String fieldName, Instant value)voidwriteInt(String fieldName, int value)voidwriteInt(String fieldName, Integer value)voidwriteInts(String fieldName, int[] values)voidwriteLong(String fieldName, long value)voidwriteLong(String fieldName, Long value)voidwriteLongs(String fieldName, long[] values)<E> voidwriteObject(String fieldName, E value, Class<? extends E> clazz)voidwriteString(String fieldName, String value)
-
-
-
Method Detail
-
getSerializationContext
ImmutableSerializationContext getSerializationContext()
During reading, a marshaller can obtain the currentImmutableSerializationContextand use it in order to access the schema or marshaller information.
-
writeInt
void writeInt(String fieldName, int value) throws IOException
- Throws:
IOException
-
writeInt
void writeInt(String fieldName, Integer value) throws IOException
- Throws:
IOException
-
writeInts
void writeInts(String fieldName, int[] values) throws IOException
- Throws:
IOException
-
writeLong
void writeLong(String fieldName, long value) throws IOException
- Throws:
IOException
-
writeLong
void writeLong(String fieldName, Long value) throws IOException
- Throws:
IOException
-
writeLongs
void writeLongs(String fieldName, long[] values) throws IOException
- Throws:
IOException
-
writeDate
void writeDate(String fieldName, Date value) throws IOException
- Throws:
IOException
-
writeInstant
void writeInstant(String fieldName, Instant value) throws IOException
- Throws:
IOException
-
writeDouble
void writeDouble(String fieldName, double value) throws IOException
- Throws:
IOException
-
writeDouble
void writeDouble(String fieldName, Double value) throws IOException
- Throws:
IOException
-
writeDoubles
void writeDoubles(String fieldName, double[] values) throws IOException
- Throws:
IOException
-
writeFloat
void writeFloat(String fieldName, float value) throws IOException
- Throws:
IOException
-
writeFloat
void writeFloat(String fieldName, Float value) throws IOException
- Throws:
IOException
-
writeFloats
void writeFloats(String fieldName, float[] values) throws IOException
- Throws:
IOException
-
writeBoolean
void writeBoolean(String fieldName, boolean value) throws IOException
- Throws:
IOException
-
writeBoolean
void writeBoolean(String fieldName, Boolean value) throws IOException
- Throws:
IOException
-
writeBooleans
void writeBooleans(String fieldName, boolean[] values) throws IOException
- Throws:
IOException
-
writeString
void writeString(String fieldName, String value) throws IOException
- Throws:
IOException
-
writeBytes
void writeBytes(String fieldName, byte[] value) throws IOException
- Throws:
IOException
-
writeBytes
void writeBytes(String fieldName, InputStream input) throws IOException
- Throws:
IOException
-
writeObject
<E> void writeObject(String fieldName, E value, Class<? extends E> clazz) throws IOException
- Throws:
IOException
-
writeEnum
@Deprecated <E extends Enum<E>> void writeEnum(String fieldName, E value, Class<E> clazz) throws IOException
Deprecated.replaced bywriteEnum(String fieldName, Enum value)Writes an enum value. The third argument (theclasswas never used internally) so this variant is now deprecated.- Throws:
IOException
-
writeEnum
<E extends Enum<E>> void writeEnum(String fieldName, E value) throws IOException
Writes an enum value.- Parameters:
fieldName- the field namevalue- the enum value- Throws:
IOException
-
writeCollection
<E> void writeCollection(String fieldName, Collection<? super E> collection, Class<E> elementClass) throws IOException
- Throws:
IOException
-
writeArray
<E> void writeArray(String fieldName, E[] array, Class<? extends E> elementClass) throws IOException
- Throws:
IOException
-
-