|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.io.OutputStream
|
+--org.omg.CORBA.portable.OutputStream
|
+--org.omg.CORBA_2_3.portable.OutputStream
|
+--org.objectweb.david.apis.presentation.DavidOutputStream
|
+--org.objectweb.david.libs.presentation.portable.PortableMarshallerFactory.PortableMarshaller
PortableMarshaller is an (abstract) implementation of Marshaller.
| Field Summary | |
static int |
CHUNKS
|
static int |
CODEBASE
|
protected Chunk |
current
The current chunk in the message, i.e., the one data are written to. |
protected int |
encapsulation_start
|
protected Chunk |
first
The first chunk in the message. |
static int |
INDIRECTION_TAG
|
static int |
MULTIPLE_TYPES
|
static int |
NULL_TAG
|
protected int |
offset
The offset of the first writable byte in current. |
protected int |
prev_size
prev_size is such that prev_size + offset = the current
offset in the whole message. |
static int |
SINGLE_TYPE
|
protected int |
top
The offset of the first non-writable byte in current. |
static int |
VALUE_TAG
|
| Constructor Summary | |
PortableMarshallerFactory.PortableMarshaller()
Builds a new marshaller. |
|
| Method Summary | |
void |
close()
Closes the stream. |
InputStream |
create_input_stream()
|
void |
endEncapsulation(int previous_encapsulation_start)
|
Context |
getContext()
Returns a Context associated with this marshaller. |
int |
getOffset()
Returns the current offset in the message, i.e., the position in the message at which the next byte will be written. |
Chunk |
getState()
Returns the state of the message as a (chain of) chunk(s). |
ORB |
orb()
|
OutputStream |
outputStream()
Returns an output stream to write into the message. |
protected void |
prepare()
When offset is equal to top, this method is
% called to get a new chunk to write to. |
void |
reset()
This method causes the message to lose all its references to the underlying chunks, without releasing
them. |
boolean |
sameContents(Marshaller other)
Checks if the target marshaller and the provided one have the same contents, i.e., they contain the same bits. |
void |
setOffset(int off)
Sets the offset in the message. |
int |
startEncapsulation()
|
void |
write_abstract_interface(Object value)
|
void |
write_Abstract(Object value)
|
void |
write_any_array(Any[] seq,
int offset,
int length)
|
void |
write_any(Any value)
|
void |
write_boolean_array(boolean[] array,
int off,
int len)
|
void |
write_boolean(boolean value)
|
void |
write_char_array(char[] array,
int off,
int len)
|
void |
write_char(char value)
|
void |
write_double(double value)
|
void |
write_float(float value)
|
void |
write_long(int value)
|
void |
write_longdouble(double value)
|
void |
write_longlong(long value)
|
void |
write_Object(Object value)
Method used by stubs when they need to send interfaces references. |
void |
write_octet_array(byte[] array,
int off,
int len)
|
void |
write_octet(byte value)
|
void |
write_short(short value)
|
void |
write_string(String value)
|
void |
write_TypeCode(TypeCode value)
|
void |
write_ulong(int value)
|
void |
write_ulonglong(long value)
|
void |
write_ushort(short value)
|
void |
write_value(Serializable value)
|
void |
write_Value(Serializable value)
|
void |
write_value(Serializable value,
BoxedValueHelper factory)
|
void |
write_value(Serializable value,
Class classe)
Marshals a value |
void |
write_value(Serializable value,
String repository_id)
|
void |
write_wchar(char value)
|
void |
write_wstring(String value)
|
void |
write(byte[] array,
int off,
int len)
Writes 'len' bytes from the specified byte array starting at offset 'off' to this output message. |
void |
write(Chunk chunk)
Writes a chunk in the message. |
void |
write(int b)
Writes the specified byte to this message. |
void |
writeBoolean(boolean v)
Writes a boolean in a message. |
void |
writeByte(byte v)
Writes a byte in a message. |
void |
writeByteArray(byte[] array,
int off,
int len)
Writes an array of bytes in a message. |
void |
writeChar8(char v)
Writes a char in a message. |
protected void |
writePadding(int constraint)
|
void |
writeReference(Object value)
Method used by stubs when they need to send interfaces references. |
void |
writeString8(String str)
Writes a string in a message. |
void |
writeValue(Object value)
Writes a value in the marshaller. |
| Methods inherited from class org.objectweb.david.apis.presentation.DavidOutputStream |
write_Principal |
| Methods inherited from class org.omg.CORBA.portable.OutputStream |
write_Context, write_double_array, write_fixed, write_float_array, write_long_array, write_longlong_array, write_short_array, write_ulong_array, write_ulonglong_array, write_ushort_array, write_wchar_array |
| Methods inherited from class java.io.OutputStream |
flush, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.objectweb.jonathan.apis.presentation.Marshaller |
isLittleEndian, writeChar16, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeString16 |
| Methods inherited from interface org.omg.CORBA.DataOutputStream |
write_double_array, write_float_array, write_long_array, write_longlong_array, write_short_array, write_ulong_array, write_ulonglong_array, write_ushort_array, write_wchar_array |
| Field Detail |
protected Chunk first
protected Chunk current
protected int offset
current.protected int top
current.protected int prev_size
offset = the current
offset in the whole message.protected int encapsulation_start
public static final int NULL_TAG
public static final int VALUE_TAG
public static final int CODEBASE
public static final int SINGLE_TYPE
public static final int MULTIPLE_TYPES
public static final int CHUNKS
public static final int INDIRECTION_TAG
| Constructor Detail |
public PortableMarshallerFactory.PortableMarshaller()
| Method Detail |
public ORB orb()
orb in class OutputStreampublic void write(Chunk chunk)
MarshallerThe target becomes the "owner" of the provided chunk, and therefore is not supposed to duplicate it. If the entity invoking this operation wants to keep a reference to the chunk, it must be duplicated.
org.objectweb.jonathan.apis.presentation.Marshallerchunk - the chunk to be written.public Chunk getState()
Marshaller
The returned chunk(s) are NOT duplicated. If the caller keeps a
reference to them, it must reset the message, and not
continue to use it.
org.objectweb.jonathan.apis.presentation.Marshallerpublic int getOffset()
Marshallerorg.objectweb.jonathan.apis.presentation.Marshallerpublic void setOffset(int off)
MarshallerThis method may be used to override data already written into the message.
org.objectweb.jonathan.apis.presentation.Marshalleroffset - the new offset.public void reset()
Marshallerreleasing
them. This method must not be used if no reference to chunks present in the
message is held by an entity in charge of their release. It also releases
the context associated with the target marshaller.public void close()
DavidOutputStreamThis method has been added here to solve an exception conflict between OutputStream and Marshaller.
close in class DavidOutputStreampublic OutputStream outputStream()
Marshallerorg.objectweb.jonathan.apis.presentation.Marshallerpublic final boolean sameContents(Marshaller other)
Marshallerorg.objectweb.jonathan.apis.presentation.Marshallermarshaller - a marshaller;
public void writeByte(byte v)
throws JonathanException
v - a byte;JonathanException - if an error occurs.
public void writeBoolean(boolean v)
throws JonathanException
v - a boolean;JonathanException - if an error occurs.
public void writeChar8(char v)
throws JonathanException
v - a char;JonathanException - if an error occurs.
public void writeString8(String str)
throws JonathanException
str - a string;JonathanException - if an error occurs.public final void writeReference(Object value)
exp - the surrogate that must be sent;public final void writeValue(Object value)
Marshallerorg.objectweb.jonathan.apis.presentation.Marshallerobj - an objectJonathanException - if a marshal error occurred.
public void writeByteArray(byte[] array,
int off,
int len)
throws JonathanException
array - an array of bytes;JonathanException - if an error occurs.public InputStream create_input_stream()
create_input_stream in class OutputStreampublic final void write_boolean(boolean value)
write_boolean in class OutputStreampublic final void write_char(char value)
write_char in class OutputStreampublic final void write_wchar(char value)
write_wchar in class OutputStreampublic final void write_octet(byte value)
write_octet in class OutputStreampublic final void write_short(short value)
write_short in class OutputStreampublic final void write_ushort(short value)
write_ushort in class OutputStreampublic final void write_long(int value)
write_long in class OutputStreampublic final void write_ulong(int value)
write_ulong in class OutputStreampublic final void write_longlong(long value)
write_longlong in class OutputStreampublic final void write_ulonglong(long value)
write_ulonglong in class OutputStreampublic final void write_float(float value)
write_float in class OutputStreampublic final void write_double(double value)
write_double in class OutputStreampublic final void write_string(String value)
write_string in class OutputStreampublic final void write_wstring(String value)
write_wstring in class OutputStreampublic void write_Value(Serializable value)
value - public void write_value(Serializable value)
write_value in class OutputStream
public void write_value(Serializable value,
String repository_id)
write_value in class OutputStreamvalue - rep_id -
public void write_value(Serializable value,
Class classe)
write_value in class OutputStreamvalue - classe -
public void write_value(Serializable value,
BoxedValueHelper factory)
write_value in class OutputStreamvalue - factory -
public final void write_boolean_array(boolean[] array,
int off,
int len)
write_boolean_array in class OutputStream
public final void write_char_array(char[] array,
int off,
int len)
write_char_array in class OutputStream
public final void write_octet_array(byte[] array,
int off,
int len)
write_octet_array in class OutputStreampublic final void write_Object(Object value)
write_Object in class OutputStreamexp - the surrogate that must be sent;public final void write_TypeCode(TypeCode value)
write_TypeCode in class OutputStreampublic final void write_any(Any value)
write_any in class OutputStream
public final void write(int b)
throws IOException
This method calls the write(byte) method.
write in class OutputStreamb - the byte.IOException - if no buffer to write to could be obtained.
public final void write(byte[] array,
int off,
int len)
throws IOException
write in class OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.public final Context getContext()
MarshallerContext associated with this marshaller.org.objectweb.jonathan.apis.presentation.MarshallerContext associated with this marshaller.
protected void prepare()
throws JonathanException
offset is equal to top, this method is
% called to get a new chunk to write to.JonathanException - if something goes wrong.public void write_longdouble(double value)
public void write_abstract_interface(Object value)
write_abstract_interface in class OutputStreampublic void write_Abstract(Object value)
public void write_any_array(Any[] seq,
int offset,
int length)
public int startEncapsulation()
throws JonathanException
startEncapsulation in class DavidOutputStream
public void endEncapsulation(int previous_encapsulation_start)
throws JonathanException
endEncapsulation in class DavidOutputStream
protected void writePadding(int constraint)
throws JonathanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||