|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UnMarshaller
UnMarshaller is the type of basic types unmarshallers. It should be used by protocols.
Method Summary | |
---|---|
int |
bytesRead()
Returns the number of bytes read since the beginning. |
void |
close()
Closes the target unmarshaller, releasing all underlying resources (including a possible chunk provider). |
org.objectweb.jonathan.apis.kernel.Context |
getContext()
Returns a Context associated with this unmarshaller. |
InputStream |
inputStream()
Returns an input stream to read data from the unmarshaller. |
boolean |
isLittleEndian()
Returns true if this unmarshaller is little-endian, false otherwise. |
boolean |
readBoolean()
Reads a boolean. |
byte |
readByte()
Reads a byte. |
void |
readByteArray(byte[] array,
int offset,
int len)
Reads an array of bytes. |
char |
readChar16()
Reads a 16 bits char. |
char |
readChar8()
Reads a 8 bits char. |
double |
readDouble()
Reads a double. |
float |
readFloat()
Reads a float. |
int |
readInt()
Reads an int. |
long |
readLong()
Reads a long. |
Object |
readReference()
Reads a reference to an object. |
short |
readShort()
Reads a short. |
String |
readString16()
Reads a string composed of 16 bits chars. |
String |
readString8()
Reads a string composed of 8 bits chars. |
Object |
readValue()
Reads a value |
void |
setByteOrder(boolean little_endian)
Sets the byte order (returned by isLittleEndian ) of
the target unmarshaller |
void |
setSize(int size)
Sets the number of bytes readable from the unmarshaller. |
Method Detail |
---|
byte readByte() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.boolean readBoolean() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.char readChar8() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.char readChar16() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.short readShort() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.int readInt() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.long readLong() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.float readFloat() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.double readDouble() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.String readString8() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.String readString16() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.Object readReference() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.Object readValue() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.void readByteArray(byte[] array, int offset, int len) throws org.objectweb.jonathan.apis.kernel.JonathanException
array
- a byte array (of size >= offset + len)offset
- the position (in array) of the first byte to writelen
- the total number of bytes to read;
org.objectweb.jonathan.apis.kernel.JonathanException
- if the format of the data is incompatible
with the request.InputStream inputStream()
boolean isLittleEndian()
void setByteOrder(boolean little_endian)
isLittleEndian
) of
the target unmarshaller
little_endian
- the new byte order.int bytesRead()
void setSize(int size) throws org.objectweb.jonathan.apis.kernel.JonathanException
Once this method has been called, it won't be possible to read more than the
size
specified bytes from this unmarshaller. Knowing the exact
number of readable bytes lets the unmarshaller free the resources (such as
a chunk provider) that won't be used. This method may block until the
expected number of bytes is readable.
size
- the expected number of readable bytes.
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.void close()
org.objectweb.jonathan.apis.kernel.Context getContext()
Context
associated with this unmarshaller.
Context
associated with this unmarshaller.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |