public class DefaultPortableReader extends Object implements PortableReader
Modifier and Type | Field and Description |
---|---|
protected ClassDefinition |
cd |
Constructor and Description |
---|
DefaultPortableReader(com.hazelcast.nio.serialization.PortableSerializer serializer,
BufferObjectDataInput in,
ClassDefinition cd) |
Modifier and Type | Method and Description |
---|---|
int |
getFieldClassId(String fieldName) |
Set<String> |
getFieldNames() |
FieldType |
getFieldType(String fieldName) |
ObjectDataInput |
getRawDataInput()
|
int |
getVersion() |
boolean |
hasField(String fieldName) |
boolean |
readBoolean(String fieldName) |
byte |
readByte(String fieldName) |
byte[] |
readByteArray(String fieldName) |
char |
readChar(String fieldName) |
char[] |
readCharArray(String fieldName) |
double |
readDouble(String fieldName) |
double[] |
readDoubleArray(String fieldName) |
float |
readFloat(String fieldName) |
float[] |
readFloatArray(String fieldName) |
int |
readInt(String fieldName) |
int[] |
readIntArray(String fieldName) |
long |
readLong(String fieldName) |
long[] |
readLongArray(String fieldName) |
Portable |
readPortable(String fieldName) |
Portable[] |
readPortableArray(String fieldName) |
short |
readShort(String fieldName) |
short[] |
readShortArray(String fieldName) |
String |
readUTF(String fieldName) |
protected final ClassDefinition cd
public DefaultPortableReader(com.hazelcast.nio.serialization.PortableSerializer serializer, BufferObjectDataInput in, ClassDefinition cd)
public int getVersion()
getVersion
in interface PortableReader
public boolean hasField(String fieldName)
hasField
in interface PortableReader
fieldName
- name of the fieldpublic Set<String> getFieldNames()
getFieldNames
in interface PortableReader
public FieldType getFieldType(String fieldName)
getFieldType
in interface PortableReader
fieldName
- name of the fieldpublic int getFieldClassId(String fieldName)
getFieldClassId
in interface PortableReader
fieldName
- name of the fieldpublic int readInt(String fieldName) throws IOException
readInt
in interface PortableReader
fieldName
- name of the fieldIOException
public long readLong(String fieldName) throws IOException
readLong
in interface PortableReader
fieldName
- name of the fieldIOException
public String readUTF(String fieldName) throws IOException
readUTF
in interface PortableReader
fieldName
- name of the fieldIOException
public boolean readBoolean(String fieldName) throws IOException
readBoolean
in interface PortableReader
fieldName
- name of the fieldIOException
public byte readByte(String fieldName) throws IOException
readByte
in interface PortableReader
fieldName
- name of the fieldIOException
public char readChar(String fieldName) throws IOException
readChar
in interface PortableReader
fieldName
- name of the fieldIOException
public double readDouble(String fieldName) throws IOException
readDouble
in interface PortableReader
fieldName
- name of the fieldIOException
public float readFloat(String fieldName) throws IOException
readFloat
in interface PortableReader
fieldName
- name of the fieldIOException
public short readShort(String fieldName) throws IOException
readShort
in interface PortableReader
fieldName
- name of the fieldIOException
public byte[] readByteArray(String fieldName) throws IOException
readByteArray
in interface PortableReader
fieldName
- name of the fieldIOException
public char[] readCharArray(String fieldName) throws IOException
readCharArray
in interface PortableReader
fieldName
- name of the fieldIOException
public int[] readIntArray(String fieldName) throws IOException
readIntArray
in interface PortableReader
fieldName
- name of the fieldIOException
public long[] readLongArray(String fieldName) throws IOException
readLongArray
in interface PortableReader
fieldName
- name of the fieldIOException
public double[] readDoubleArray(String fieldName) throws IOException
readDoubleArray
in interface PortableReader
fieldName
- name of the fieldIOException
public float[] readFloatArray(String fieldName) throws IOException
readFloatArray
in interface PortableReader
fieldName
- name of the fieldIOException
public short[] readShortArray(String fieldName) throws IOException
readShortArray
in interface PortableReader
fieldName
- name of the fieldIOException
public Portable readPortable(String fieldName) throws IOException
readPortable
in interface PortableReader
fieldName
- name of the fieldIOException
public Portable[] readPortableArray(String fieldName) throws IOException
readPortableArray
in interface PortableReader
fieldName
- name of the fieldIOException
public ObjectDataInput getRawDataInput() throws IOException
PortableReader
PortableWriter.getRawDataOutput()
.
Note that portable fields can not read after getRawDataInput() is called. In case this happens,
IOException will be thrown.getRawDataInput
in interface PortableReader
IOException
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.