|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.io.InputStream
|
+--org.omg.CORBA.portable.InputStream
|
+--org.omg.CORBA_2_3.portable.InputStream
|
+--org.objectweb.david.apis.presentation.DavidInputStream
|
+--org.objectweb.david.libs.presentation.portable.PortableMarshallerFactory.PortableUnMarshaller
PortableUnMarshaller is an implementation of UnMarshaller.
| Field Summary | |
protected Chunk |
first
The first chunk in the message, i.e., the one data are read from. |
protected int |
last_offset
last_offset is such that last_offset +
offset is equal to the number of bytes read since the
beginning of the reading process. |
protected boolean |
little_endian
If true, the target unmarshaller expects a little endian encoding of data. |
protected int |
offset
offset of the next byte to read in first |
| Constructor Summary | |
protected |
PortableMarshallerFactory.PortableUnMarshaller(Chunk first,
int read)
Creates a new unmarshaller. |
| Method Summary | |
int |
available()
Returns the number of bytes that can be read without blocking. |
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). |
void |
endEncapsulation(int encapsulation_spec)
|
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. |
protected void |
prepare()
When nothing can be read from the current chunk, this method tries to get a new chunk to read data from. |
Object |
read_abstract_interface()
|
Object |
read_abstract_interface(Class clz)
|
Any |
read_any()
|
void |
read_boolean_array(boolean[] array,
int off,
int len)
|
boolean |
read_boolean()
|
void |
read_char_array(char[] array,
int off,
int len)
|
char |
read_char()
|
void |
read_double_array(double[] array,
int off,
int len)
|
double |
read_double()
|
void |
read_float_array(float[] array,
int off,
int len)
|
float |
read_float()
|
void |
read_long_array(int[] array,
int off,
int len)
|
int |
read_long()
|
void |
read_longlong_array(long[] array,
int off,
int len)
|
long |
read_longlong()
|
Object |
read_Object()
|
Object |
read_Object(Class classe)
|
void |
read_octet_array(byte[] array,
int off,
int len)
|
byte |
read_octet()
|
void |
read_short_array(short[] array,
int off,
int len)
|
short |
read_short()
|
String |
read_string()
|
TypeCode |
read_TypeCode()
|
void |
read_ulong_array(int[] array,
int off,
int len)
|
int |
read_ulong()
|
void |
read_ulonglong_array(long[] array,
int off,
int len)
|
long |
read_ulonglong()
|
void |
read_ushort_array(short[] array,
int off,
int len)
|
short |
read_ushort()
|
Serializable |
read_value()
|
Serializable |
read_value(BoxedValueHelper factory)
|
Serializable |
read_value(Class clz)
|
Serializable |
read_value(Serializable value)
|
Serializable |
read_value(String rep_id)
|
void |
read_wchar_array(char[] array,
int off,
int len)
|
char |
read_wchar()
|
String |
read_wstring()
|
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)
Reads an array of bytes. |
char |
readChar16()
Reads a 16 bits char. |
char |
readChar8()
Reads a char from a message. |
double |
readDouble()
Reads a double. |
float |
readFloat()
Reads a float. |
int |
readInt()
Reads an int. |
long |
readLong()
Reads a long. |
Object |
readReference()
Method used by stubs when they need to send interfaces references. |
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 new_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. |
long |
skip(long n)
Skips over and discards n bytes of data from this input stream. |
protected void |
skipPadding(int constraint)
|
int |
startEncapsulation()
|
| Methods inherited from class org.objectweb.david.apis.presentation.DavidInputStream |
read_Principal |
| Methods inherited from class org.omg.CORBA.portable.InputStream |
orb, read_Context, read_fixed |
| 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 Chunk first
protected int offset
firstprotected int last_offset
last_offset is such that last_offset +
offset is equal to the number of bytes read since the
beginning of the reading process.protected boolean little_endian
| Constructor Detail |
protected PortableMarshallerFactory.PortableUnMarshaller(Chunk first,
int read)
first - the (chain of) chunk(s) to read data from;read - the number of already read bytes (used to initialize
last_offset.| Method Detail |
public void close()
UnMarshallerclose in interface UnMarshallerclose in class DavidInputStream
public void setSize(int size)
throws JonathanException
UnMarshaller
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.
setSize in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallersize - the expected number of readable bytes.JonathanException - if something goes wrong.
public byte readByte()
throws JonathanException
readByte in interface UnMarshallerJonathanException - if an IO exception occurs.
public boolean readBoolean()
throws JonathanException
readBoolean in interface UnMarshallerJonathanException - if an IO exception occurs.
public char readChar8()
throws JonathanException
readChar8 in interface UnMarshallerJonathanException - if an IO exception occurs.
public char readChar16()
throws JonathanException
UnMarshallerreadChar16 in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerJonathanException - if the format of the data is incompatible
with the request.
public short readShort()
throws JonathanException
UnMarshallerreadShort in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerJonathanException - if the format of the data is incompatible
with the request.
public int readInt()
throws JonathanException
UnMarshallerreadInt in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerJonathanException - if the format of the data is incompatible
with the request.
public long readLong()
throws JonathanException
UnMarshallerreadLong in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerJonathanException - if the format of the data is incompatible
with the request.
public float readFloat()
throws JonathanException
UnMarshallerreadFloat in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerJonathanException - if the format of the data is incompatible
with the request.
public double readDouble()
throws JonathanException
UnMarshallerreadDouble in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerJonathanException - if the format of the data is incompatible
with the request.
public String readString8()
throws JonathanException
UnMarshallerreadString8 in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerJonathanException - if the format of the data is incompatible
with the request.
public String readString16()
throws JonathanException
UnMarshallerreadString16 in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerJonathanException - if the format of the data is incompatible
with the request.public final Object readReference()
readReference in interface UnMarshallerexp - the surrogate that must be sent;public final Object readValue()
UnMarshallerreadValue in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerJonathanException - if the format of the data is incompatible
with the request.
public void readByteArray(byte[] array,
int off,
int len)
throws JonathanException
UnMarshallerreadByteArray in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerarray - 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;JonathanException - if the format of the data is incompatible
with the request.public final boolean isLittleEndian()
isLittleEndian in interface UnMarshallerpublic void setByteOrder(boolean new_little_endian)
UnMarshallerisLittleEndian) of
the target unmarshallersetByteOrder in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerlittle_endian - the new byte order.public InputStream inputStream()
UnMarshallerinputStream in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerpublic boolean read_boolean()
read_boolean in class InputStreampublic char read_char()
read_char in class InputStreampublic char read_wchar()
read_wchar in class InputStreampublic byte read_octet()
read_octet in class InputStreampublic short read_short()
read_short in class InputStreampublic short read_ushort()
read_ushort in class InputStreampublic int read_long()
read_long in class InputStreampublic int read_ulong()
read_ulong in class InputStreampublic long read_longlong()
read_longlong in class InputStreampublic long read_ulonglong()
read_ulonglong in class InputStreampublic float read_float()
read_float in class InputStreampublic double read_double()
read_double in class InputStreampublic String read_string()
read_string in class InputStreampublic String read_wstring()
read_wstring in class InputStream
public void read_boolean_array(boolean[] array,
int off,
int len)
read_boolean_array in class InputStream
public void read_char_array(char[] array,
int off,
int len)
read_char_array in class InputStream
public void read_wchar_array(char[] array,
int off,
int len)
read_wchar_array in class InputStream
public void read_octet_array(byte[] array,
int off,
int len)
read_octet_array in class InputStream
public void read_short_array(short[] array,
int off,
int len)
read_short_array in class InputStream
public void read_ushort_array(short[] array,
int off,
int len)
read_ushort_array in class InputStream
public void read_long_array(int[] array,
int off,
int len)
read_long_array in class InputStream
public void read_ulong_array(int[] array,
int off,
int len)
read_ulong_array in class InputStream
public void read_longlong_array(long[] array,
int off,
int len)
read_longlong_array in class InputStream
public void read_ulonglong_array(long[] array,
int off,
int len)
read_ulonglong_array in class InputStream
public void read_float_array(float[] array,
int off,
int len)
read_float_array in class InputStream
public void read_double_array(double[] array,
int off,
int len)
read_double_array in class InputStreampublic Object read_Object()
read_Object in class InputStreampublic Object read_Object(Class classe)
read_Object in class InputStreampublic Any read_any()
read_any in class InputStreampublic TypeCode read_TypeCode()
read_TypeCode in class InputStreampublic Serializable read_value()
read_value in class InputStreampublic Serializable read_value(String rep_id)
read_value in class InputStreampublic Serializable read_value(Class clz)
read_value in class InputStreampublic Serializable read_value(BoxedValueHelper factory)
read_value in class InputStreampublic Serializable read_value(Serializable value)
read_value in class InputStreampublic Object read_abstract_interface()
read_abstract_interface in class InputStreampublic Object read_abstract_interface(Class clz)
read_abstract_interface in class InputStream
public int read()
throws IOException
read in class InputStreamIOException - if an error occurs.readByte()
public int read(byte[] array,
int off,
int length)
throws IOException
readByteArray() method.read in class InputStreamarray - 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 InputStreamn - the number of bytes to be skipped.IOException - if an I/O error occurs.
public int available()
throws IOException
available in class InputStreamIOException - if an error occurs.public int bytesRead()
UnMarshallerbytesRead in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshaller
protected void skipPadding(int constraint)
throws JonathanException
public int startEncapsulation()
throws JonathanException
startEncapsulation in class DavidInputStreampublic void endEncapsulation(int encapsulation_spec)
endEncapsulation in class DavidInputStreampublic final Context getContext()
UnMarshallerContext associated with this unmarshaller.getContext in interface UnMarshallerorg.objectweb.jonathan.apis.presentation.UnMarshallerContext associated with this unmarshaller.
protected void prepare()
throws JonathanException
JonathanException - if something goes wrong.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||