Package org.infinispan.protostream
Interface MessageMarshaller.ProtoStreamWriter
- Enclosing interface:
- MessageMarshaller<T>
public static interface MessageMarshaller.ProtoStreamWriter
A high-level interface for the wire encoding of a Protobuf stream that allows writing named (and typed) message
fields.
-
Method Summary
Modifier and TypeMethodDescriptionDuring reading, a marshaller can obtain the currentImmutableSerializationContext
and use it in order to access the schema or marshaller information.<E> void
writeArray
(String fieldName, E[] array, Class<? extends E> elementClass) void
writeBoolean
(String fieldName, boolean value) void
writeBoolean
(String fieldName, Boolean value) void
writeBooleans
(String fieldName, boolean[] values) void
writeBytes
(String fieldName, byte[] value) void
writeBytes
(String fieldName, InputStream input) <E> void
writeCollection
(String fieldName, Collection<? super E> collection, Class<E> elementClass) void
void
writeDouble
(String fieldName, double value) void
writeDouble
(String fieldName, Double value) void
writeDoubles
(String fieldName, double[] values) <E extends Enum<E>>
voidWrites an enum value.void
writeFloat
(String fieldName, float value) void
writeFloat
(String fieldName, Float value) void
writeFloats
(String fieldName, float[] values) void
writeInstant
(String fieldName, Instant value) void
void
void
void
void
void
writeLongs
(String fieldName, long[] values) <K,
V> void <E> void
writeObject
(String fieldName, E value, Class<? extends E> clazz) void
writeString
(String fieldName, String value)
-
Method Details
-
getSerializationContext
ImmutableSerializationContext getSerializationContext()During reading, a marshaller can obtain the currentImmutableSerializationContext
and use it in order to access the schema or marshaller information. -
writeInt
- Throws:
IOException
-
writeInt
- Throws:
IOException
-
writeInts
- Throws:
IOException
-
writeLong
- Throws:
IOException
-
writeLong
- Throws:
IOException
-
writeLongs
- Throws:
IOException
-
writeDate
- Throws:
IOException
-
writeInstant
- Throws:
IOException
-
writeDouble
- Throws:
IOException
-
writeDouble
- Throws:
IOException
-
writeDoubles
- Throws:
IOException
-
writeFloat
- Throws:
IOException
-
writeFloat
- Throws:
IOException
-
writeFloats
- Throws:
IOException
-
writeBoolean
- Throws:
IOException
-
writeBoolean
- Throws:
IOException
-
writeBooleans
- Throws:
IOException
-
writeString
- Throws:
IOException
-
writeBytes
- Throws:
IOException
-
writeBytes
- Throws:
IOException
-
writeObject
- Throws:
IOException
-
writeEnum
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
-
writeMap
<K,V> void writeMap(String fieldName, Map<? super K, ? super V> map, Class<K> keyClass, Class<V> valueClass) throws IOException- Throws:
IOException
-