public class DefaultPortableReader extends ValueReader implements PortableReader
| Modifier and Type | Field and Description |
|---|---|
protected ClassDefinition |
cd |
protected com.hazelcast.internal.serialization.impl.PortableSerializer |
serializer |
| 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) |
Object |
read(String path) |
void |
read(String path,
ValueCallback callback)
Read the value of the attribute specified by the path and returns the result via the callback.
|
void |
read(String path,
ValueCollector collector)
Read the value of the attribute specified by the path and returns the result directly to the collector.
|
boolean |
readBoolean(String path) |
boolean[] |
readBooleanArray(String path) |
byte |
readByte(String path) |
byte[] |
readByteArray(String path) |
char |
readChar(String path) |
char[] |
readCharArray(String path) |
double |
readDouble(String path) |
double[] |
readDoubleArray(String path) |
float |
readFloat(String path) |
float[] |
readFloatArray(String path) |
int |
readInt(String path) |
int[] |
readIntArray(String path) |
long |
readLong(String path) |
long[] |
readLongArray(String path) |
Portable |
readPortable(String path) |
Portable[] |
readPortableArray(String fieldName) |
short |
readShort(String path) |
short[] |
readShortArray(String path) |
String |
readUTF(String path) |
String[] |
readUTFArray(String path) |
protected final ClassDefinition cd
protected final com.hazelcast.internal.serialization.impl.PortableSerializer serializer
public int getVersion()
getVersion in interface PortableReaderpublic boolean hasField(String fieldName)
hasField in interface PortableReaderfieldName - name of the field (does not support nested paths)public Set<String> getFieldNames()
getFieldNames in interface PortableReaderpublic FieldType getFieldType(String fieldName)
getFieldType in interface PortableReaderfieldName - name of the fieldpublic int getFieldClassId(String fieldName)
getFieldClassId in interface PortableReaderfieldName - name of the fieldpublic ObjectDataInput getRawDataInput() throws IOException
PortableReaderPortableWriter.getRawDataOutput().
Note that portable fields can not read after getRawDataInput() is called. In case this happens,
IOException will be thrown.getRawDataInput in interface PortableReaderIOExceptionpublic byte readByte(String path) throws IOException
readByte in interface PortableReaderpath - name of the fieldIOExceptionpublic short readShort(String path) throws IOException
readShort in interface PortableReaderpath - name of the fieldIOExceptionpublic int readInt(String path) throws IOException
readInt in interface PortableReaderpath - name of the fieldIOExceptionpublic long readLong(String path) throws IOException
readLong in interface PortableReaderpath - name of the fieldIOExceptionpublic float readFloat(String path) throws IOException
readFloat in interface PortableReaderpath - name of the fieldIOExceptionpublic double readDouble(String path) throws IOException
readDouble in interface PortableReaderpath - name of the fieldIOExceptionpublic boolean readBoolean(String path) throws IOException
readBoolean in interface PortableReaderpath - name of the fieldIOExceptionpublic char readChar(String path) throws IOException
readChar in interface PortableReaderpath - name of the fieldIOExceptionpublic String readUTF(String path) throws IOException
readUTF in interface PortableReaderpath - name of the fieldIOExceptionpublic Portable readPortable(String path) throws IOException
readPortable in interface PortableReaderpath - name of the fieldIOExceptionpublic byte[] readByteArray(String path) throws IOException
readByteArray in interface PortableReaderpath - name of the fieldIOExceptionpublic boolean[] readBooleanArray(String path) throws IOException
readBooleanArray in interface PortableReaderpath - name of the fieldIOExceptionpublic char[] readCharArray(String path) throws IOException
readCharArray in interface PortableReaderpath - name of the fieldIOExceptionpublic int[] readIntArray(String path) throws IOException
readIntArray in interface PortableReaderpath - name of the fieldIOExceptionpublic long[] readLongArray(String path) throws IOException
readLongArray in interface PortableReaderpath - name of the fieldIOExceptionpublic double[] readDoubleArray(String path) throws IOException
readDoubleArray in interface PortableReaderpath - name of the fieldIOExceptionpublic float[] readFloatArray(String path) throws IOException
readFloatArray in interface PortableReaderpath - name of the fieldIOExceptionpublic short[] readShortArray(String path) throws IOException
readShortArray in interface PortableReaderpath - name of the fieldIOExceptionpublic String[] readUTFArray(String path) throws IOException
readUTFArray in interface PortableReaderpath - name of the fieldIOExceptionpublic Portable[] readPortableArray(String fieldName) throws IOException
readPortableArray in interface PortableReaderfieldName - name of the fieldIOExceptionpublic void read(String path, ValueCallback callback)
ValueReaderread in class ValueReaderpath - attribute to read the value fromcallback - callback to call with the value. May be called more than once in case of wildcards.public void read(String path, ValueCollector collector)
ValueReaderread in class ValueReaderpath - attribute to read the value fromcollector - collector to collect the result with. May collect more than one result in case of wildcards.public Object read(String path) throws IOException
IOExceptionCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.