public final class ProtoStreamReaderImpl extends Object implements MessageMarshaller.ProtoStreamReader
| Constructor and Description |
|---|
ProtoStreamReaderImpl(SerializationContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
<A> A |
read(com.google.protobuf.CodedInputStream in,
Class<A> clazz) |
<A> A |
read(com.google.protobuf.CodedInputStream in,
MessageMarshaller<A> marshaller) |
<A> A[] |
readArray(String fieldName,
Class<? extends A> clazz) |
Boolean |
readBoolean(String fieldName) |
byte[] |
readBytes(String fieldName) |
<A,C extends Collection<? super A>> |
readCollection(String fieldName,
C collection,
Class<? extends A> clazz) |
Double |
readDouble(String fieldName) |
Float |
readFloat(String fieldName) |
Integer |
readInt(String fieldName)
Can't return an
int here because the field might be declared optional and missing so we might need to
return a null. |
Long |
readLong(String fieldName) |
<A> A |
readObject(String fieldName,
Class<? extends A> clazz) |
String |
readString(String fieldName) |
public ProtoStreamReaderImpl(SerializationContext ctx)
public <A> A read(com.google.protobuf.CodedInputStream in,
Class<A> clazz)
throws IOException
IOExceptionpublic <A> A read(com.google.protobuf.CodedInputStream in,
MessageMarshaller<A> marshaller)
throws IOException
IOExceptionpublic Integer readInt(String fieldName) throws IOException
MessageMarshaller.ProtoStreamReaderint here because the field might be declared optional and missing so we might need to
return a null.readInt in interface MessageMarshaller.ProtoStreamReaderIOExceptionpublic Long readLong(String fieldName) throws IOException
readLong in interface MessageMarshaller.ProtoStreamReaderIOExceptionpublic Float readFloat(String fieldName) throws IOException
readFloat in interface MessageMarshaller.ProtoStreamReaderIOExceptionpublic Double readDouble(String fieldName) throws IOException
readDouble in interface MessageMarshaller.ProtoStreamReaderIOExceptionpublic Boolean readBoolean(String fieldName) throws IOException
readBoolean in interface MessageMarshaller.ProtoStreamReaderIOExceptionpublic String readString(String fieldName) throws IOException
readString in interface MessageMarshaller.ProtoStreamReaderIOExceptionpublic byte[] readBytes(String fieldName) throws IOException
readBytes in interface MessageMarshaller.ProtoStreamReaderIOExceptionpublic <A> A readObject(String fieldName, Class<? extends A> clazz) throws IOException
readObject in interface MessageMarshaller.ProtoStreamReaderIOExceptionpublic <A,C extends Collection<? super A>> C readCollection(String fieldName, C collection, Class<? extends A> clazz) throws IOException
readCollection in interface MessageMarshaller.ProtoStreamReaderIOExceptionpublic <A> A[] readArray(String fieldName, Class<? extends A> clazz) throws IOException
readArray in interface MessageMarshaller.ProtoStreamReaderIOExceptionCopyright © 2016 JBoss, a division of Red Hat. All rights reserved.