public class OctetDataReader extends Object implements DataReader
DataReader that reconstructs values written with a OctetDataWriter.| Constructor and Description |
|---|
OctetDataReader(InputStream in)
Creates a
OctetDataReader. |
| Modifier and Type | Method and Description |
|---|---|
int |
beginArray()
Starts reading an array.
|
void |
beginObject()
Starts reading an object.
|
void |
endArray()
Finishes reading the array started with
DataReader.beginArray(). |
void |
endObject()
Finishes reading the object started with the last call to
DataReader.beginObject(). |
boolean |
hasNext()
|
byte[] |
nextBinary()
Reads a binary string value.
|
double |
nextDouble()
Reads a 64 bit double value.
|
float |
nextFloat()
Reads a 32 bit float value.
|
int |
nextInt()
Reads an (unsigned) integer value.
|
int |
nextIntFixed()
Reads a full 32 bit integer value.
|
int |
nextIntSigned()
Reads a signed integer value.
|
long |
nextLong()
Reads an (unsigned) long value.
|
long |
nextLongFixed()
Reads a full 64 bit long value.
|
long |
nextLongSigned()
Reads a signed long value.
|
int |
nextName()
When
reading an object, retrieves the next field
identifier. |
String |
nextString()
Reads an utf-8
String value. |
void |
skipValue()
Skips the current value to read.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnextBooleanpublic OctetDataReader(InputStream in)
OctetDataReader.public void beginObject()
throws IOException
DataReader
After this call, an alternating sequence of calls to DataReader.nextName()
followed by a value retrieval method such as DataReader.nextInt(),...
DataReader.nextString() followed by a final call to DataReader.endObject() is
expected.
beginObject in interface DataReaderIOExceptionpublic void endObject()
throws IOException
DataReaderDataReader.beginObject().endObject in interface DataReaderIOExceptionpublic boolean hasNext()
throws IOException
DataReaderhasNext in interface DataReaderIOExceptionpublic int nextName()
throws IOException
DataReaderreading an object, retrieves the next field
identifier.
Note: DataReader.hasNext() must return true to be able to read
the next field identifier.
nextName in interface DataReaderIOExceptionpublic int nextInt()
throws IOException
DataReadernextInt in interface DataReaderIOExceptionpublic int nextIntSigned()
throws IOException
DataReadernextIntSigned in interface DataReaderIOExceptionpublic int nextIntFixed()
throws IOException
DataReadernextIntFixed in interface DataReaderIOExceptionpublic long nextLong()
throws IOException
DataReadernextLong in interface DataReaderIOExceptionpublic long nextLongSigned()
throws IOException
DataReadernextLongSigned in interface DataReaderIOExceptionpublic long nextLongFixed()
throws IOException
DataReadernextLongFixed in interface DataReaderIOExceptionpublic float nextFloat()
throws IOException
DataReadernextFloat in interface DataReaderIOExceptionpublic double nextDouble()
throws IOException
DataReadernextDouble in interface DataReaderIOExceptionpublic String nextString() throws IOException
DataReaderString value.nextString in interface DataReaderIOExceptionpublic byte[] nextBinary()
throws IOException
DataReadernextBinary in interface DataReaderIOExceptionpublic int beginArray()
throws IOException
DataReaderbeginArray in interface DataReaderIOExceptionpublic void endArray()
throws IOException
DataReaderDataReader.beginArray().endArray in interface DataReaderIOExceptionpublic void skipValue()
throws IOException
DataReaderskipValue in interface DataReaderIOExceptionCopyright © 2021. All rights reserved.