|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jp.develop.common.util.amf.AmfEncoder
public class AmfEncoder
Main class of AMF encoder. This class implements ObjectOutput for the encode of externalizable object.
AmfUtil
Constructor Summary | |
---|---|
AmfEncoder(OutputStream out)
Constructs a instance with specified output stream. |
|
AmfEncoder(OutputStream out,
AmfEncoderOption option)
Constructs a instance with specified output stream and configuration option. |
Method Summary | ||
---|---|---|
void |
close()
|
|
void |
flush()
|
|
void |
write(byte[] b)
|
|
void |
write(byte[] b,
int off,
int len)
|
|
void |
write(int b)
|
|
|
writeAmfArray(IEncoder.IArrayEncoder<T> encoder,
T array)
Write array by AMF manner. |
|
|
writeAmfArray(IEncoder.IArrayEncoder<T> encoder,
T array,
boolean useReference)
Write array by AMF manner with reference control. |
|
void |
writeAmfBoolean(boolean value)
Write boolean by AMF manner. |
|
void |
writeAmfByteArray(byte[] bytes)
Write byte array by AMF manner. |
|
void |
writeAmfDate(Date date)
Write date by AMF manner. |
|
|
writeAmfDictionary(IEncoder.IDictionaryEncoder<T> encoder,
T object)
Write dictionary by AMF manner. |
|
void |
writeAmfDouble(double value)
Write double by AMF manner. |
|
void |
writeAmfInteger(int value)
Write integer by AMF manner. |
|
void |
writeAmfNull()
Write null by AMF manner. |
|
|
writeAmfObject(IEncoder.IObjectEncoder<T> encoder,
T object)
Write object by AMF manner. |
|
void |
writeAmfString(String string)
Write string by AMF manner. |
|
void |
writeAmfUndefined()
Write undefined by AMF manner. |
|
void |
writeAmfXml(String xml)
Write XML by AMF manner(Not implemented) UnsupportedOperationException is just thrown. |
|
void |
writeAmfXmlDocument(String xml)
Write XML document by AMF manner. |
|
void |
writeBoolean(boolean v)
|
|
void |
writeByte(int v)
|
|
void |
writeBytes(String s)
|
|
void |
writeChar(int v)
|
|
void |
writeChars(String s)
|
|
void |
writeDouble(double v)
|
|
void |
writeFloat(float v)
|
|
void |
writeInt(int v)
|
|
void |
writeLong(long v)
|
|
void |
writeObject(Object obj)
Write object encoded by AMF. |
|
void |
writeShort(int v)
|
|
void |
writeStringOrReference(String string)
Write string by AMF manner(without marker). |
|
void |
writeU29(int value)
Write unsigned integer(29bit) by AMF manner. |
|
void |
writeUTF(String s)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AmfEncoder(OutputStream out)
out
- Output stream.public AmfEncoder(OutputStream out, AmfEncoderOption option)
out
- Output stream.option
- Configuration option.Method Detail |
---|
public void writeObject(Object obj) throws IOException
writeObject
in interface ObjectOutput
obj
- The object to be encoded.
IOException
- I/O Exception.public final void writeAmfUndefined() throws IOException
IOException
- I/O Exception.public final void writeAmfNull() throws IOException
IOException
- I/O Exception.public final void writeAmfBoolean(boolean value) throws IOException
value
- The value to be encoded.
IOException
- I/O Exception.public final void writeAmfInteger(int value) throws IOException
value
- The value to be encoded.
IOException
- I/O Exception.public final void writeAmfDouble(double value) throws IOException
value
- The value to be encoded.
IOException
- I/O Exception.public final void writeAmfString(String string) throws IOException
string
- The string to be encoded.
IOException
- I/O Exception.public final void writeAmfXmlDocument(String xml) throws IOException
xml
- The XML string to be encoded.
IOException
- I/O Exception.public final void writeAmfDate(Date date) throws IOException
date
- The date to be encoded.
IOException
- I/O Exception.public final <T> void writeAmfArray(IEncoder.IArrayEncoder<T> encoder, T array) throws IOException
T
- The type of array to be encoded.encoder
- The encoder for specified array.array
- The array to be encoded.
IOException
- I/O Exception.public final <T> void writeAmfArray(IEncoder.IArrayEncoder<T> encoder, T array, boolean useReference) throws IOException
T
- The type of array to be encoded.encoder
- The encoder for specified array.array
- The array to be encoded.useReference
- true for using reference.
IOException
- I/O Exception.public final <T> void writeAmfObject(IEncoder.IObjectEncoder<T> encoder, T object) throws IOException
T
- The type of object to be encoded.encoder
- The encoder for specified object.object
- The object to be encoded.
IOException
- I/O Exception.public final <T> void writeAmfDictionary(IEncoder.IDictionaryEncoder<T> encoder, T object) throws IOException
T
- The type of dictionary to be encoded.encoder
- The encoder for specified array.object
- The dictionary to be encoded.
IOException
- I/O Exception.public final void writeAmfXml(String xml) throws IOException
UnsupportedOperationException
is just thrown.
xml
- The XML to be encoded.
IOException
- I/O Exception.public final void writeAmfByteArray(byte[] bytes) throws IOException
bytes
- The byte array to be encoded.
IOException
- I/O Exception.public final void writeU29(int value) throws IOException
value
- The value to be encoded.
IOException
- I/O Exception.public final void writeStringOrReference(String string) throws IOException
string
- The string to be encoded.
IOException
- I/O Exception.public void writeBoolean(boolean v) throws IOException
writeBoolean
in interface DataOutput
IOException
public void writeByte(int v) throws IOException
writeByte
in interface DataOutput
IOException
public void writeBytes(String s) throws IOException
writeBytes
in interface DataOutput
IOException
public void writeChar(int v) throws IOException
writeChar
in interface DataOutput
IOException
public void writeChars(String s) throws IOException
writeChars
in interface DataOutput
IOException
public void writeDouble(double v) throws IOException
writeDouble
in interface DataOutput
IOException
public void writeFloat(float v) throws IOException
writeFloat
in interface DataOutput
IOException
public void writeInt(int v) throws IOException
writeInt
in interface DataOutput
IOException
public void writeLong(long v) throws IOException
writeLong
in interface DataOutput
IOException
public void writeShort(int v) throws IOException
writeShort
in interface DataOutput
IOException
public void writeUTF(String s) throws IOException
writeUTF
in interface DataOutput
IOException
public void write(int b) throws IOException
write
in interface DataOutput
write
in interface ObjectOutput
IOException
public void write(byte[] b) throws IOException
write
in interface DataOutput
write
in interface ObjectOutput
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in interface DataOutput
write
in interface ObjectOutput
IOException
public void flush() throws IOException
flush
in interface ObjectOutput
IOException
public void close() throws IOException
close
in interface ObjectOutput
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |