public abstract class AbstractDataReader extends java.lang.Object implements DataReader
DataReader
interface with the following features:
DataReader
interface (an IllegalStateException
thrown on error).0
(e.g readBoolean
calls readBoolean0
). Methods can throw any kind of exceptions that will be wrapped into an IOException
.end()
method is called when the data is terminated.Constructor and Description |
---|
AbstractDataReader() |
Modifier and Type | Method and Description |
---|---|
void |
end()
This method is called when the data has been fully read, giving
a "finalization" hook to the implementation.
|
boolean |
hasMoreElements()
Tells whether the current collection has more elements.
|
protected abstract boolean |
hasMoreElements0() |
void |
readArrayValueEnd()
Reads the end of an array value.
|
protected abstract void |
readArrayValueEnd0() |
void |
readArrayValueStart()
Reads the beginning of an array value.
|
protected abstract void |
readArrayValueStart0() |
boolean |
readBooleanValue()
Reads the next expected boolean value.
|
protected abstract boolean |
readBooleanValue0() |
double |
readDoubleValue()
Reads the next expected double precision floating point value (64bits).
|
protected abstract double |
readDoubleValue0() |
int |
readIntKey()
Reads the next expected integer key (signed 32bits) within the current map.
|
protected abstract int |
readIntKey0() |
int |
readIntValue()
Reads the next expected integer value (signed 32bits).
|
protected abstract int |
readIntValue0() |
long |
readLongValue()
Reads the next expected long integer value (signed 64bits).
|
protected abstract long |
readLongValue0() |
void |
readMapValueEnd()
Reads the end of a map value.
|
protected abstract void |
readMapValueEnd0() |
void |
readMapValueStart()
Reads the beginning of a map value.
|
protected abstract void |
readMapValueStart0() |
java.lang.String |
readStringKey()
Reads the next expected
String key within the current map. |
protected abstract java.lang.String |
readStringKey0() |
java.lang.String |
readStringValue()
Reads the next expected
String value. |
protected abstract java.lang.String |
readStringValue0() |
void |
skipValue()
Skip the next value.
|
protected abstract void |
skipValue0() |
public final boolean hasMoreElements() throws java.io.IOException
DataReader
hasMoreElements
in interface DataReader
java.io.IOException
- on I/O error.public final boolean readBooleanValue() throws java.io.IOException
DataReader
readBooleanValue
in interface DataReader
java.io.IOException
- on I/O error.public final int readIntValue() throws java.io.IOException
DataReader
readIntValue
in interface DataReader
java.io.IOException
- on I/O error.public final long readLongValue() throws java.io.IOException
DataReader
readLongValue
in interface DataReader
java.io.IOException
- on I/O error.public final java.lang.String readStringValue() throws java.io.IOException
DataReader
String
value.readStringValue
in interface DataReader
java.io.IOException
- on I/O error.public final double readDoubleValue() throws java.io.IOException
DataReader
readDoubleValue
in interface DataReader
java.io.IOException
- on I/O error.public final java.lang.String readStringKey() throws java.io.IOException
DataReader
String
key within the current map.readStringKey
in interface DataReader
java.io.IOException
- on I/O error.public final int readIntKey() throws java.io.IOException
DataReader
readIntKey
in interface DataReader
java.io.IOException
- on I/O error.public final void readArrayValueStart() throws java.io.IOException
DataReader
readArrayValueStart
in interface DataReader
java.io.IOException
- on I/O error.public final void readArrayValueEnd() throws java.io.IOException
DataReader
readArrayValueEnd
in interface DataReader
java.io.IOException
- on I/O error.public final void readMapValueStart() throws java.io.IOException
DataReader
readMapValueStart
in interface DataReader
java.io.IOException
- on I/O error.public final void readMapValueEnd() throws java.io.IOException
DataReader
readMapValueEnd
in interface DataReader
java.io.IOException
- on I/O error.public final void skipValue() throws java.io.IOException
DataReader
skipValue
in interface DataReader
java.io.IOException
- on I/O error.public void end() throws java.io.IOException
java.io.IOException
- on I/O error.protected abstract boolean hasMoreElements0() throws java.lang.Throwable
java.lang.Throwable
protected abstract boolean readBooleanValue0() throws java.lang.Throwable
java.lang.Throwable
protected abstract int readIntValue0() throws java.lang.Throwable
java.lang.Throwable
protected abstract long readLongValue0() throws java.lang.Throwable
java.lang.Throwable
protected abstract double readDoubleValue0() throws java.lang.Throwable
java.lang.Throwable
protected abstract java.lang.String readStringValue0() throws java.lang.Throwable
java.lang.Throwable
protected abstract java.lang.String readStringKey0() throws java.lang.Throwable
java.lang.Throwable
protected abstract int readIntKey0() throws java.lang.Throwable
java.lang.Throwable
protected abstract void readArrayValueStart0() throws java.lang.Throwable
java.lang.Throwable
protected abstract void readArrayValueEnd0() throws java.lang.Throwable
java.lang.Throwable
protected abstract void readMapValueStart0() throws java.lang.Throwable
java.lang.Throwable
protected abstract void readMapValueEnd0() throws java.lang.Throwable
java.lang.Throwable
protected abstract void skipValue0() throws java.lang.Throwable
java.lang.Throwable