public class AMF0Serializer
extends java.lang.Object
| Constructor and Description |
|---|
AMF0Serializer(java.io.OutputStream outputStream)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
convertDOMToString(org.w3c.dom.Node node) |
protected java.lang.Object[] |
convertPrimitiveArrayToObjectArray(java.lang.Object array) |
protected boolean |
isPrimitiveArray(java.lang.Object obj) |
void |
serializeMessage(AMF0Message message)
Writes message
|
protected void |
write(java.util.Collection<?> collection)
Writes collection
|
protected void |
write(org.w3c.dom.Document document)
Writes XML Document
|
protected void |
write(java.util.Iterator<?> iterator)
Writes Iterator - convert to List and call
writeCollection |
protected void |
writeArray(java.lang.Object[] array)
Writes Array Object - call
writeData foreach element |
protected void |
writeBody(AMF0Body body)
Writes message body
|
protected void |
writeData(java.lang.Object value)
Writes Data
|
protected void |
writeHeader(AMF0Header header)
Writes message header
|
protected void |
writeMap(java.util.Map<?,?> map)
Writes Object Map
|
protected void |
writeObject(java.lang.Object object)
Writes Object
|
protected void |
writePrimitiveArray(java.lang.Object array) |
protected int |
writeString(java.lang.String str)
Most of this code was cribbed from Java's DataOutputStream.writeUTF method
which only supports Strings <= 65535 UTF-encoded characters.
|
public AMF0Serializer(java.io.OutputStream outputStream)
outputStream - public void serializeMessage(AMF0Message message) throws java.io.IOException
message - java.io.IOExceptionprotected void writeHeader(AMF0Header header) throws java.io.IOException
header - AMF message headerjava.io.IOExceptionprotected void writeBody(AMF0Body body) throws java.io.IOException
body - AMF message bodyjava.io.IOExceptionprotected void writeData(java.lang.Object value)
throws java.io.IOException
value - java.io.IOExceptionprotected void writeObject(java.lang.Object object)
throws java.io.IOException
object - java.io.IOExceptionprotected void writeArray(java.lang.Object[] array)
throws java.io.IOException
writeData foreach elementarray - java.io.IOExceptionprotected void writePrimitiveArray(java.lang.Object array)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.Object[] convertPrimitiveArrayToObjectArray(java.lang.Object array)
protected void write(java.util.Iterator<?> iterator)
throws java.io.IOException
writeCollectioniterator - Iteratorjava.io.IOExceptionprotected void write(java.util.Collection<?> collection)
throws java.io.IOException
collection - Collectionjava.io.IOExceptionprotected void writeMap(java.util.Map<?,?> map)
throws java.io.IOException
map - java.io.IOExceptionprotected void write(org.w3c.dom.Document document)
throws java.io.IOException
document - java.io.IOExceptionprotected int writeString(java.lang.String str)
throws java.io.IOException
java.io.IOExceptionprotected boolean isPrimitiveArray(java.lang.Object obj)
public static java.lang.String convertDOMToString(org.w3c.dom.Node node)