|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.granite.messaging.amf.io.AMF0Serializer
public class AMF0Serializer
AMF Serializer
| Constructor Summary | |
|---|---|
AMF0Serializer(OutputStream outputStream)
Constructor |
|
| Method Summary | |
|---|---|
static String |
convertDOMToString(Node node)
|
protected Object[] |
convertPrimitiveArrayToObjectArray(Object array)
|
protected boolean |
isPrimitiveArray(Object obj)
|
void |
serializeMessage(AMF0Message message)
Writes message |
protected void |
write(Collection<?> collection)
Writes collection |
protected void |
write(Document document)
Writes XML Document |
protected void |
write(Iterator<?> iterator)
Writes Iterator - convert to List and call writeCollection |
protected void |
writeArray(Object[] array)
Writes Array Object - call writeData foreach element |
protected void |
writeBody(AMF0Body body)
Writes message body |
protected void |
writeData(Object value)
Writes Data |
protected void |
writeHeader(AMF0Header header)
Writes message header |
protected void |
writeMap(Map<?,?> map)
Writes Object Map |
protected void |
writeObject(Object object)
Writes Object |
protected void |
writePrimitiveArray(Object array)
|
protected int |
writeString(String str)
Most of this code was cribbed from Java's DataOutputStream.writeUTF method which only supports Strings <= 65535 UTF-encoded characters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AMF0Serializer(OutputStream outputStream)
outputStream - | Method Detail |
|---|
public void serializeMessage(AMF0Message message)
throws IOException
message -
IOException
protected void writeHeader(AMF0Header header)
throws IOException
header - AMF message header
IOException
protected void writeBody(AMF0Body body)
throws IOException
body - AMF message body
IOException
protected void writeData(Object value)
throws IOException
value -
IOException
protected void writeObject(Object object)
throws IOException
object -
IOException
protected void writeArray(Object[] array)
throws IOException
writeData foreach element
array -
IOException
protected void writePrimitiveArray(Object array)
throws IOException
IOExceptionprotected Object[] convertPrimitiveArrayToObjectArray(Object array)
protected void write(Iterator<?> iterator)
throws IOException
writeCollection
iterator - Iterator
IOException
protected void write(Collection<?> collection)
throws IOException
collection - Collection
IOException
protected void writeMap(Map<?,?> map)
throws IOException
map -
IOException
protected void write(Document document)
throws IOException
document -
IOException
protected int writeString(String str)
throws IOException
IOExceptionprotected boolean isPrimitiveArray(Object obj)
public static String convertDOMToString(Node node)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||