public class AMF0Serializer extends Object
| Constructor and Description |
|---|
AMF0Serializer(OutputStream outputStream)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public AMF0Serializer(OutputStream outputStream)
outputStream - public void serializeMessage(AMF0Message message) throws IOException
message - IOExceptionprotected void writeHeader(AMF0Header header) throws IOException
header - AMF message headerIOExceptionprotected void writeBody(AMF0Body body) throws IOException
body - AMF message bodyIOExceptionprotected void writeData(Object value) throws IOException
value - IOExceptionprotected void writeObject(Object object) throws IOException
object - IOExceptionprotected void writeArray(Object[] array) throws IOException
writeData foreach elementarray - IOExceptionprotected void writePrimitiveArray(Object array) throws IOException
IOExceptionprotected Object[] convertPrimitiveArrayToObjectArray(Object array)
protected void write(Iterator<?> iterator) throws IOException
writeCollectioniterator - IteratorIOExceptionprotected void write(Collection<?> collection) throws IOException
collection - CollectionIOExceptionprotected void writeMap(Map<?,?> map) throws IOException
map - IOExceptionprotected void write(Document document) throws IOException
document - IOExceptionprotected int writeString(String str) throws IOException
IOExceptionprotected boolean isPrimitiveArray(Object obj)
public static String convertDOMToString(Node node)