StdUnMarshaller is an (abstract) implementation of UnMarshaller.
available
public int available()
throws IOException
Returns the number of bytes that can be read without blocking. The
default implementation uses the 'size' method.
- the number of bytes that can be read without blocking;
org.objectweb.jonathan.apis.resources.ChunkProvider
bytesRead
public int bytesRead()
getContext
public final Context getContext()
isLittleEndian
public final boolean isLittleEndian()
Returns true if this unmarshaller is little-endian, false otherwise.
- true if this unmarshaller is little-endian, false otherwise.
prepare
protected void prepare()
throws JonathanException
read
public int read()
throws IOException
Reads one byte from the message. If the end of the stream is reached,-1
is returned. The default implementation uses the 'readByte' method.
- the byte read.
org.objectweb.jonathan.apis.resources.ChunkProvider
read
public int read(byte[] array,
int off,
int length)
throws IOException
Reads data from the message into an array of bytes. The default
implementation uses the
readByteArray()
method.
array
- the buffer into which the data is read.
- the actual number of bytes read.
readBoolean
public boolean readBoolean()
throws JonathanException
Reads a boolean from a message.
- a boolean.
readByte
public byte readByte()
throws JonathanException
Reads a byte from a message.
- a byte.
readByteArray
public void readByteArray(byte[] array,
int off,
int len)
throws JonathanException
readChar16
public char readChar16()
throws JonathanException
readChar8
public char readChar8()
throws JonathanException
Reads a char from a message.
- a char.
readDouble
public double readDouble()
throws JonathanException
readFloat
public float readFloat()
throws JonathanException
readInt
public int readInt()
throws JonathanException
readLong
public long readLong()
throws JonathanException
readReference
public final Object readReference()
throws JonathanException
Method used by stubs when they need to send interfaces references.
readShort
public short readShort()
throws JonathanException
readString16
public String readString16()
throws JonathanException
readString8
public String readString8()
throws JonathanException
readValue
public final Object readValue()
throws JonathanException
setByteOrder
public void setByteOrder(boolean little_endian)
setSize
public void setSize(int size)
throws JonathanException
skip
public long skip(long n)
throws IOException
Skips over and discards n bytes of data from this input stream. The skip
method may, for a variety of reasons, end up skipping over some smaller
number of bytes, possibly 0. The actual number of bytes skipped is
returned.
The default implementation calls the
skip(int) method.
n
- the number of bytes to be skipped.
- the actual number of bytes skipped.