public class AMF3Serializer extends java.lang.Object implements java.io.ObjectOutput, AMF3Constants
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
AMF3Serializer.AMF3Writer |
AMF3_ARRAY, AMF3_BOOLEAN_FALSE, AMF3_BOOLEAN_TRUE, AMF3_BYTEARRAY, AMF3_DATE, AMF3_DICTIONARY, AMF3_INTEGER, AMF3_INTEGER_MAX, AMF3_INTEGER_MIN, AMF3_NULL, AMF3_NUMBER, AMF3_OBJECT, AMF3_SIGNED_INTEGER_MASK, AMF3_STRING, AMF3_UNDEFINED, AMF3_VECTOR_INT, AMF3_VECTOR_NUMBER, AMF3_VECTOR_OBJECT, AMF3_VECTOR_UINT, AMF3_XML, AMF3_XMLSTRING, UTF8| Constructor and Description |
|---|
AMF3Serializer(java.io.OutputStream out) |
AMF3Serializer(java.io.OutputStream out,
int capacity) |
| Modifier and Type | Method and Description |
|---|---|
protected IndexedJavaClassDescriptor |
addToStoredClassDescriptors(java.lang.Class<?> clazz) |
void |
close() |
protected void |
ensureCapacity(int capacity) |
void |
flush() |
protected void |
flushBuffer() |
protected int |
getArrayOrCollectionLength(java.lang.Object o) |
protected static boolean |
getChannelProperty(java.lang.String channelId,
ChannelConfig channelConfig,
java.lang.String name) |
protected AMF3Serializer.AMF3Writer |
getWriter(java.lang.Class<?> cls) |
void |
reset() |
protected static int |
utfByteCount(java.lang.String s) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
protected void |
writeAMF3Boolean(boolean value) |
protected void |
writeAMF3BooleanArray(boolean[] array) |
protected void |
writeAMF3ByteArray(byte[] bytes) |
protected void |
writeAMF3ByteObjectArray(java.lang.Byte[] array) |
protected void |
writeAMF3CharArray(char[] array) |
protected void |
writeAMF3CharObjectArray(java.lang.Character[] array) |
protected void |
writeAMF3Collection(java.util.Collection<?> c) |
protected void |
writeAMF3Date(java.util.Date date) |
protected void |
writeAMF3Dictionary(AMFDictionaryValue value) |
protected void |
writeAMF3DoubleArray(double[] array) |
protected void |
writeAMF3FloatArray(float[] array) |
protected void |
writeAMF3IntArray(int[] array) |
protected void |
writeAMF3Integer(int i) |
protected void |
writeAMF3LongArray(long[] array) |
protected void |
writeAMF3Null() |
protected void |
writeAMF3Number(double d) |
protected void |
writeAMF3Object(java.lang.Object o) |
protected void |
writeAMF3ObjectArray(java.lang.Object array) |
protected void |
writeAMF3ShortArray(short[] array) |
protected void |
writeAMF3SpecialValue(AMFSpecialValue<?> value) |
protected void |
writeAMF3String(java.lang.String s) |
protected void |
writeAMF3StringData(java.lang.String s) |
protected void |
writeAMF3UnsignedIntegerData(int i) |
protected void |
writeAMF3VectorInt(AMFVectorIntValue value) |
protected void |
writeAMF3VectorNumber(AMFVectorNumberValue value) |
protected void |
writeAMF3VectorObject(AMFVectorObjectValue value) |
protected void |
writeAMF3VectorUint(AMFVectorUintValue value) |
protected void |
writeAMF3Xml(org.w3c.dom.Document doc) |
protected JavaClassDescriptor |
writeAndGetAMF3Descriptor(java.lang.Class<?> cls) |
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(java.lang.String s) |
void |
writeChar(int v) |
void |
writeChars(java.lang.String s) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
protected static int |
writeIntData(byte[] buffer,
int position,
int i) |
void |
writeLong(long v) |
protected static int |
writeLongData(byte[] buffer,
int position,
long l) |
void |
writeObject(java.lang.Object o) |
void |
writeShort(int v) |
void |
writeUTF(java.lang.String s) |
protected static final AMF3Serializer.AMF3Writer AMF3_STRING_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_BOOLEAN_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_INTEGER_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_NUMBER_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_DATE_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_CALENDAR_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_DOCUMENT_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_COLLECTION_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_BOOLEAN_ARRAY_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_CHAR_ARRAY_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_CHAR_OBJECT_ARRAY_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_BYTE_ARRAY_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_BYTE_OBJECT_ARRAY_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_SHORT_ARRAY_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_INT_ARRAY_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_LONG_ARRAY_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_FLOAT_ARRAY_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_DOUBLE_ARRAY_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_OBJECT_ARRAY_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_SPECIAL_VALUE_WRITER
protected static final AMF3Serializer.AMF3Writer AMF3_OBJECT_WRITER
protected final java.io.OutputStream out
protected final byte[] buffer
protected int position
protected final StringIndexedCache storedStrings
protected final ObjectIndexedCache storedObjects
protected final java.util.Map<java.lang.Class<?>,IndexedJavaClassDescriptor> storedClassDescriptors
protected final java.util.Map<java.lang.Class<?>,AMF3Serializer.AMF3Writer> writersCache
protected final Converters converters
protected final ClassGetter classGetter
protected final XMLUtil xmlUtil
protected final ExternalizersConfig externalizersConfig
protected final boolean externalizeLong
protected final boolean externalizeBigInteger
protected final boolean externalizeBigDecimal
protected final boolean legacyXmlSerialization
protected final boolean legacyCollectionSerialization
public AMF3Serializer(java.io.OutputStream out)
public AMF3Serializer(java.io.OutputStream out,
int capacity)
protected static boolean getChannelProperty(java.lang.String channelId,
ChannelConfig channelConfig,
java.lang.String name)
public void reset()
public void writeObject(java.lang.Object o)
throws java.io.IOException
writeObject in interface java.io.ObjectOutputjava.io.IOExceptionprotected void writeAMF3Null()
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3Boolean(boolean value)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3Integer(int i)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3UnsignedIntegerData(int i)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3Number(double d)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3String(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3StringData(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3Xml(org.w3c.dom.Document doc)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3Date(java.util.Date date)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3BooleanArray(boolean[] array)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3CharArray(char[] array)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3CharObjectArray(java.lang.Character[] array)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3ByteArray(byte[] bytes)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3ByteObjectArray(java.lang.Byte[] array)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3ShortArray(short[] array)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3IntArray(int[] array)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3LongArray(long[] array)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3FloatArray(float[] array)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3DoubleArray(double[] array)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3ObjectArray(java.lang.Object array)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3Collection(java.util.Collection<?> c)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3Object(java.lang.Object o)
throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3SpecialValue(AMFSpecialValue<?> value) throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3VectorObject(AMFVectorObjectValue value) throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3VectorInt(AMFVectorIntValue value) throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3VectorNumber(AMFVectorNumberValue value) throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3VectorUint(AMFVectorUintValue value) throws java.io.IOException
java.io.IOExceptionprotected void writeAMF3Dictionary(AMFDictionaryValue value) throws java.io.IOException
java.io.IOExceptionprotected int getArrayOrCollectionLength(java.lang.Object o)
protected AMF3Serializer.AMF3Writer getWriter(java.lang.Class<?> cls)
protected JavaClassDescriptor writeAndGetAMF3Descriptor(java.lang.Class<?> cls) throws java.io.IOException
java.io.IOExceptionprotected IndexedJavaClassDescriptor addToStoredClassDescriptors(java.lang.Class<?> clazz)
protected void ensureCapacity(int capacity)
throws java.io.IOException
java.io.IOExceptionprotected void flushBuffer()
throws java.io.IOException
java.io.IOExceptionprotected static int utfByteCount(java.lang.String s)
protected static int writeIntData(byte[] buffer,
int position,
int i)
protected static int writeLongData(byte[] buffer,
int position,
long l)
public void writeBoolean(boolean v)
throws java.io.IOException
writeBoolean in interface java.io.DataOutputjava.io.IOExceptionpublic void writeByte(int v)
throws java.io.IOException
writeByte in interface java.io.DataOutputjava.io.IOExceptionpublic void writeShort(int v)
throws java.io.IOException
writeShort in interface java.io.DataOutputjava.io.IOExceptionpublic void writeChar(int v)
throws java.io.IOException
writeChar in interface java.io.DataOutputjava.io.IOExceptionpublic void writeInt(int v)
throws java.io.IOException
writeInt in interface java.io.DataOutputjava.io.IOExceptionpublic void writeLong(long v)
throws java.io.IOException
writeLong in interface java.io.DataOutputjava.io.IOExceptionpublic void writeFloat(float v)
throws java.io.IOException
writeFloat in interface java.io.DataOutputjava.io.IOExceptionpublic void writeDouble(double v)
throws java.io.IOException
writeDouble in interface java.io.DataOutputjava.io.IOExceptionpublic void writeBytes(java.lang.String s)
throws java.io.IOException
writeBytes in interface java.io.DataOutputjava.io.IOExceptionpublic void writeChars(java.lang.String s)
throws java.io.IOException
writeChars in interface java.io.DataOutputjava.io.IOExceptionpublic void writeUTF(java.lang.String s)
throws java.io.IOException
writeUTF in interface java.io.DataOutputjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in interface java.io.DataOutputwrite in interface java.io.ObjectOutputjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in interface java.io.DataOutputwrite in interface java.io.ObjectOutputjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in interface java.io.DataOutputwrite in interface java.io.ObjectOutputjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.ObjectOutputjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.ObjectOutputclose in interface java.lang.AutoCloseablejava.io.IOException