public class StdMarshallerFactory.StdUnMarshaller extends InputStream implements JRMIUnMarshaller
Modifier and Type | Field and Description |
---|---|
protected org.objectweb.jonathan.apis.kernel.Context |
context |
protected org.objectweb.jonathan.resources.api.Chunk |
first |
protected ObjectInputStream |
is |
protected int |
last_offset |
protected boolean |
little_endian |
protected int |
offset |
Modifier | Constructor and Description |
---|---|
protected |
StdMarshallerFactory.StdUnMarshaller(org.objectweb.jonathan.resources.api.Chunk first,
int read) |
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns the number of bytes that can be read without blocking.
|
int |
bytesRead() |
void |
close() |
org.objectweb.jonathan.apis.kernel.Context |
getContext() |
InputStream |
inputStream() |
boolean |
isLittleEndian()
Returns true if this unmarshaller is little-endian, false otherwise.
|
protected void |
prepare() |
int |
read()
Reads one byte from the message.
|
int |
read(byte[] array,
int off,
int length)
Reads data from the message into an array of bytes.
|
boolean |
readBoolean()
Reads a boolean from a message.
|
byte |
readByte()
Reads a byte from a message.
|
void |
readByteArray(byte[] array,
int off,
int len) |
char |
readChar16() |
char |
readChar8()
Reads a char from a message.
|
double |
readDouble() |
Exception |
readException()
Reads an exception thrown by a remote method invocation from an underlying
stream.
|
float |
readFloat() |
int |
readInt() |
long |
readLong() |
Method |
readMethod(Class objclass)
Reads a method from an underlying stream.
|
Object[] |
readParameters()
Reads the arguments in a remote method invocation from an underlying stream.
|
Object |
readReference()
Method used by stubs when they need to send interfaces references.
|
Object |
readResult()
Reads the result of a remote method invocation from an underlying stream.
|
short |
readShort() |
String |
readString16() |
String |
readString8() |
Object |
readValue() |
void |
setByteOrder(boolean little_endian) |
void |
setSize(int size) |
long |
skip(long n)
Skips over and discards n bytes of data from this input stream.
|
mark, markSupported, read, reset
protected org.objectweb.jonathan.resources.api.Chunk first
protected int offset
protected int last_offset
protected boolean little_endian
protected ObjectInputStream is
protected org.objectweb.jonathan.apis.kernel.Context context
protected StdMarshallerFactory.StdUnMarshaller(org.objectweb.jonathan.resources.api.Chunk first, int read)
public final org.objectweb.jonathan.apis.kernel.Context getContext()
getContext
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
close
in class InputStream
public void setSize(int size) throws org.objectweb.jonathan.apis.kernel.JonathanException
setSize
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
public byte readByte() throws org.objectweb.jonathan.apis.kernel.JonathanException
readByte
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
- if an IO exception occurs.public boolean readBoolean() throws org.objectweb.jonathan.apis.kernel.JonathanException
readBoolean
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
- if an IO exception occurs.public char readChar8() throws org.objectweb.jonathan.apis.kernel.JonathanException
readChar8
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
- if an IO exception occurs.public char readChar16() throws org.objectweb.jonathan.apis.kernel.JonathanException
readChar16
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
public short readShort() throws org.objectweb.jonathan.apis.kernel.JonathanException
readShort
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
public int readInt() throws org.objectweb.jonathan.apis.kernel.JonathanException
readInt
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
public long readLong() throws org.objectweb.jonathan.apis.kernel.JonathanException
readLong
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
public float readFloat() throws org.objectweb.jonathan.apis.kernel.JonathanException
readFloat
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
public double readDouble() throws org.objectweb.jonathan.apis.kernel.JonathanException
readDouble
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
public String readString8() throws org.objectweb.jonathan.apis.kernel.JonathanException
readString8
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
public String readString16() throws org.objectweb.jonathan.apis.kernel.JonathanException
readString16
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
public final Object readReference() throws org.objectweb.jonathan.apis.kernel.JonathanException
readReference
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
exp
- the surrogate that must be sent;org.objectweb.jonathan.apis.kernel.JonathanException
public final Object readValue() throws org.objectweb.jonathan.apis.kernel.JonathanException
readValue
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
public void readByteArray(byte[] array, int off, int len) throws org.objectweb.jonathan.apis.kernel.JonathanException
readByteArray
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
org.objectweb.jonathan.apis.kernel.JonathanException
public Method readMethod(Class objclass) throws UnmarshalException
JRMIUnMarshaller
readMethod
in interface JRMIUnMarshaller
objclass
- a class that declares the method.UnmarshalException
- if something goes wrong.public Object[] readParameters() throws UnmarshalException
JRMIUnMarshaller
readParameters
in interface JRMIUnMarshaller
UnmarshalException
- if something goes wrong.public Object readResult() throws UnmarshalException
JRMIUnMarshaller
readResult
in interface JRMIUnMarshaller
UnmarshalException
- if something goes wrong.public Exception readException() throws UnmarshalException
JRMIUnMarshaller
readException
in interface JRMIUnMarshaller
UnmarshalException
- if something goes wrong.public final boolean isLittleEndian()
isLittleEndian
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
public void setByteOrder(boolean little_endian)
setByteOrder
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
public InputStream inputStream()
inputStream
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
public int read() throws IOException
read
in class InputStream
IOException
- if an error occurs.org.objectweb.jonathan.apis.resources.ChunkProvider
public int read(byte[] array, int off, int length) throws IOException
readByteArray()
method.read
in class InputStream
array
- the buffer into which the data is read.the
- start offset of the data.the
- maximum number of bytes read.IOException
- if an error occurs.public long skip(long n) throws IOException
The default implementation calls the skip(int) method.
skip
in class InputStream
n
- the number of bytes to be skipped.IOException
- if an I/O error occurs.public int available() throws IOException
available
in class InputStream
IOException
- if an error occurs.org.objectweb.jonathan.apis.resources.ChunkProvider
public int bytesRead()
bytesRead
in interface org.objectweb.jonathan.presentation.api.UnMarshaller
protected void prepare() throws org.objectweb.jonathan.apis.kernel.JonathanException
org.objectweb.jonathan.apis.kernel.JonathanException