|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.objectweb.fractal.rmi.io.RmiUnMarshaller
public class RmiUnMarshaller
An UnMarshaller that uses an RmiObjectInputStream to
unmarshall object values.
| Field Summary | |
|---|---|
protected ContextFactory |
contextFactory
The context factory used to create the context associated with this marshaller. |
protected NamingContext |
domain
The domain used to instantiate is. |
protected java.io.ObjectInputStream |
is
The object input stream used to unmarshall object values. |
| Constructor Summary | |
|---|---|
RmiUnMarshaller(NamingContext domain,
ContextFactory contextFactory,
Chunk chunk,
int read,
ClassGenerator loader)
Constructs a new RmiUnMarshaller. |
|
RmiUnMarshaller(NamingContext domain,
ContextFactory contextFactory,
ChunkProvider provider,
ClassGenerator loader)
Constructs a new RmiUnMarshaller. |
|
| Method Summary | |
|---|---|
int |
available()
|
int |
bytesRead()
Returns the number of bytes read since the beginning. |
void |
close()
Closes this input stream and releases any system resources associated with the stream. |
Context |
getContext()
Returns a Context associated with this unmarshaller. |
protected void |
initObjectStream()
Instantiates the delegate object input stream is. |
java.io.InputStream |
inputStream()
Returns an input stream to read data from the unmarshaller. |
boolean |
isLittleEndian()
Returns true if this unmarshaller is little-endian, false otherwise. |
int |
read()
|
int |
read(byte[] array,
int off,
int length)
|
boolean |
readBoolean()
Reads a boolean. |
byte |
readByte()
Reads a byte. |
void |
readByteArray(byte[] array,
int off,
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. |
java.lang.Object |
readReference()
Reads a reference to an object. |
short |
readShort()
Reads a short. |
java.lang.String |
readString16()
Reads a string composed of 16 bits chars. |
java.lang.String |
readString8()
Reads a string composed of 8 bits chars. |
java.lang.Object |
readValue()
Reads a value. |
void |
setByteOrder(boolean littleEndian)
Sets the byte order of this unmarshaller. |
void |
setSize(int size)
Sets the number of bytes readable from the unmarshaller. |
long |
skip(long n)
|
| Methods inherited from class java.io.InputStream |
|---|
mark, markSupported, read, reset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected NamingContext domain
is.
protected ContextFactory contextFactory
getContext.
protected java.io.ObjectInputStream is
readValue or to readReference.
| Constructor Detail |
|---|
public RmiUnMarshaller(NamingContext domain,
ContextFactory contextFactory,
Chunk chunk,
int read,
ClassGenerator loader)
RmiUnMarshaller.
domain - the domain to be used to instantiate is.contextFactory - the context factory to be used to create the context
associated with this marshaller.chunk - a (chain of) chunk(s).read - the number of bytes already read from the message.
public RmiUnMarshaller(NamingContext domain,
ContextFactory contextFactory,
ChunkProvider provider,
ClassGenerator loader)
RmiUnMarshaller.
domain - the domain to be used to instantiate is.contextFactory - the context factory to be used to create the context
associated with this marshaller.provider - a chunk provider.| Method Detail |
|---|
public boolean isLittleEndian()
isLittleEndian in interface UnMarshallerpublic void setByteOrder(boolean littleEndian)
setByteOrder in interface UnMarshallerlittleEndian - the new byte order.public final Context getContext()
Context associated with this unmarshaller.
getContext in interface UnMarshallerContext associated with this unmarshaller.public int bytesRead()
bytesRead in interface UnMarshaller
public void setSize(int size)
throws JonathanException
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.
setSize in interface UnMarshallersize - the expected number of readable bytes.
JonathanException - if something goes wrong.public java.io.InputStream inputStream()
inputStream in interface UnMarshaller
public byte readByte()
throws JonathanException
readByte in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public boolean readBoolean()
throws JonathanException
readBoolean in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public char readChar8()
throws JonathanException
readChar8 in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public char readChar16()
throws JonathanException
readChar16 in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public short readShort()
throws JonathanException
readShort in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public int readInt()
throws JonathanException
readInt in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public float readFloat()
throws JonathanException
readFloat in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public long readLong()
throws JonathanException
readLong in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public double readDouble()
throws JonathanException
readDouble in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public java.lang.String readString8()
throws JonathanException
readString8 in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public java.lang.String readString16()
throws JonathanException
readString16 in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public void readByteArray(byte[] array,
int off,
int len)
throws JonathanException
readByteArray in interface UnMarshallerarray - a byte array (of size >= offset + len).off - the position (in array) of the first byte to write.len - the total number of bytes to read.
JonathanException - if the format of the data is incompatible with
the request.
public java.lang.Object readReference()
throws JonathanException
readReference in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public java.lang.Object readValue()
throws JonathanException
readValue in interface UnMarshallerJonathanException - if the format of the data is incompatible with
the request.
public int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOException
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public int read(byte[] array,
int off,
int length)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException
public long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface UnMarshallerclose in class java.io.InputStream
protected void initObjectStream()
throws java.io.IOException
is. This
method creates RmiObjectInputStream stream.
java.io.IOException - if the delegate object input stream cannot be created.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||