public static interface MessageMarshaller.ProtoStreamReader
Modifier and Type | Method and Description |
---|---|
ImmutableSerializationContext |
getSerializationContext()
During reading, a marshaller can obtain the current
ImmutableSerializationContext and use it in order
to access the schema or marshaller information. |
<E> E[] |
readArray(String fieldName,
Class<? extends E> elementClass) |
Boolean |
readBoolean(String fieldName) |
boolean[] |
readBooleans(String fieldName) |
byte[] |
readBytes(String fieldName) |
InputStream |
readBytesAsInputStream(String fieldName) |
<E,C extends Collection<? super E>> |
readCollection(String fieldName,
C collection,
Class<E> elementClass) |
Date |
readDate(String fieldName) |
Double |
readDouble(String fieldName) |
double[] |
readDoubles(String fieldName) |
<E extends Enum<E>> |
readEnum(String fieldName,
Class<E> clazz) |
Float |
readFloat(String fieldName) |
float[] |
readFloats(String fieldName) |
Instant |
readInstant(String fieldName) |
Integer |
readInt(String fieldName)
Reads an integer field given a field name.
|
int[] |
readInts(String fieldName) |
Long |
readLong(String fieldName) |
long[] |
readLongs(String fieldName) |
<E> E |
readObject(String fieldName,
Class<E> clazz) |
String |
readString(String fieldName) |
ImmutableSerializationContext getSerializationContext()
ImmutableSerializationContext
and use it in order
to access the schema or marshaller information.Integer readInt(String fieldName) throws IOException
int
here because the field might be declared optional and actually missing so we have to
be able to signal that by returning null
.IOException
int[] readInts(String fieldName) throws IOException
IOException
Long readLong(String fieldName) throws IOException
IOException
long[] readLongs(String fieldName) throws IOException
IOException
Date readDate(String fieldName) throws IOException
IOException
Instant readInstant(String fieldName) throws IOException
IOException
Float readFloat(String fieldName) throws IOException
IOException
float[] readFloats(String fieldName) throws IOException
IOException
Double readDouble(String fieldName) throws IOException
IOException
double[] readDoubles(String fieldName) throws IOException
IOException
Boolean readBoolean(String fieldName) throws IOException
IOException
boolean[] readBooleans(String fieldName) throws IOException
IOException
String readString(String fieldName) throws IOException
IOException
byte[] readBytes(String fieldName) throws IOException
IOException
InputStream readBytesAsInputStream(String fieldName) throws IOException
IOException
<E extends Enum<E>> E readEnum(String fieldName, Class<E> clazz) throws IOException
IOException
<E> E readObject(String fieldName, Class<E> clazz) throws IOException
IOException
<E,C extends Collection<? super E>> C readCollection(String fieldName, C collection, Class<E> elementClass) throws IOException
IOException
<E> E[] readArray(String fieldName, Class<? extends E> elementClass) throws IOException
IOException
Copyright © 2020 JBoss, a division of Red Hat. All rights reserved.