jp.develop.common.util.amf.encoder
Class ArrayCollectionEncoder

java.lang.Object
  extended by jp.develop.common.util.amf.encoder.CollectionEncoder
      extended by jp.develop.common.util.amf.encoder.ArrayCollectionEncoder
All Implemented Interfaces:
IEncoder<Collection<Object>>, IEncoder.IArrayEncoder<Collection<Object>>, IEncoder.IObjectEncoder<Collection<Object>>

public class ArrayCollectionEncoder
extends CollectionEncoder
implements IEncoder.IObjectEncoder<Collection<Object>>

Implementation of IEncoder for ArrayCollection. This is compatible with Flash Player.

Author:
Waki Takeya
See Also:
IEncoder, IEncoder.IObjectEncoder

Nested Class Summary
 
Nested classes/interfaces inherited from interface jp.develop.common.util.amf.encoder.IEncoder
IEncoder.IArrayEncoder<T>, IEncoder.IDictionaryEncoder<T>, IEncoder.IObjectEncoder<T>
 
Constructor Summary
ArrayCollectionEncoder()
           
 
Method Summary
 void encode(AmfEncoder encoder, Collection<Object> collection)
          Encode to Action Message Format(AMF).
 void encodeProperties(AmfEncoder encoder, TraitsInfo traits, Collection<Object> collection, PathStack path)
          Encode properties by same order of traits's properties.
 TraitsInfo getTraitsInfo(Collection<Object> object)
          Get object's traits information.
 
Methods inherited from class jp.develop.common.util.amf.encoder.CollectionEncoder
getArraySize, getIterator, getProperties, getValue, isRandomAccess
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayCollectionEncoder

public ArrayCollectionEncoder()
Method Detail

encode

public void encode(AmfEncoder encoder,
                   Collection<Object> collection)
            throws IOException
Description copied from class: CollectionEncoder
Encode to Action Message Format(AMF).

Specified by:
encode in interface IEncoder<Collection<Object>>
Overrides:
encode in class CollectionEncoder
Parameters:
encoder - AMF encoder.
collection - Object to be encoded.
Throws:
IOException - I/O Exception.

getTraitsInfo

public TraitsInfo getTraitsInfo(Collection<Object> object)
Get object's traits information.

Specified by:
getTraitsInfo in interface IEncoder.IObjectEncoder<Collection<Object>>
Parameters:
object - Target object.
Returns:
Traits information.

encodeProperties

public void encodeProperties(AmfEncoder encoder,
                             TraitsInfo traits,
                             Collection<Object> collection,
                             PathStack path)
                      throws IOException
Encode properties by same order of traits's properties. As for externalizable, it is just depended

Specified by:
encodeProperties in interface IEncoder.IObjectEncoder<Collection<Object>>
Parameters:
encoder - AMF encoder.
traits - Traits information.
collection - Object to be encoded.
Throws:
IOException - I/O Exception.