com.flagstone.transform
Class MovieMetaData

java.lang.Object
  extended by com.flagstone.transform.MovieMetaData
All Implemented Interfaces:
Copyable<MovieTag>, SWFEncodeable, MovieTag

public final class MovieMetaData
extends Object
implements MovieTag

MetaData is used to add a user-defined information into a Flash file. The information uses the Resource Description Format (RDF) and is compliant with Adobe's Extensible Metadata Platform, see http://www.adobe.com/products/xmp.


Constructor Summary
MovieMetaData(MovieMetaData object)
          Creates and initialises a MovieMetaData object using the values copied from another MovieMetaData object.
MovieMetaData(String aString)
          Creates a MoveMetaData object with the specified string containing the meta-data for the movie.
MovieMetaData(SWFDecoder coder)
          Creates and initialises a MoveMetaData object using values encoded in the Flash binary format.
 
Method Summary
 MovieMetaData copy()
          Creates a complete copy of this object.
 void encode(SWFEncoder coder, Context context)
          Encode an object to the Flash binary format.
 String getMetaData()
          Get the meta-data for the movie.
 int prepareToEncode(Context context)
          Prepare an object for encoding, returning the expected size of an object when it is encoded.
 void setMetaData(String aString)
          Set the meta-data for the movie.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MovieMetaData

public MovieMetaData(SWFDecoder coder)
              throws IOException
Creates and initialises a MoveMetaData object using values encoded in the Flash binary format.

Parameters:
coder - an SWFDecoder object that contains the encoded Flash data.
Throws:
IOException - if an error occurs while decoding the data.

MovieMetaData

public MovieMetaData(String aString)
Creates a MoveMetaData object with the specified string containing the meta-data for the movie.

Parameters:
aString - an arbitrary string containing the meta-data. Must not be null.

MovieMetaData

public MovieMetaData(MovieMetaData object)
Creates and initialises a MovieMetaData object using the values copied from another MovieMetaData object.

Parameters:
object - a MovieMetaData object from which the values will be copied.
Method Detail

getMetaData

public String getMetaData()
Get the meta-data for the movie.

Returns:
the string containing the meta-data.

setMetaData

public void setMetaData(String aString)
Set the meta-data for the movie.

Parameters:
aString - a string containing the meta-data.

copy

public MovieMetaData copy()
Creates a complete copy of this object.

Specified by:
copy in interface Copyable<MovieTag>
Returns:
a deep-copy of this object. New instances of mutable objects are copied and immutable instances are shared.

toString

public String toString()
Overrides:
toString in class Object

prepareToEncode

public int prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. This method also used to initialise variables, such as offsets and flags that will be used when the object is encoded. Generally the method returns the size in bytes, however when called on objects that use bit fields such as shapes the methods will return the size in bits.

Specified by:
prepareToEncode in interface SWFEncodeable
Parameters:
context - an Context that allows information to be passed between objects to control how they are initialised for encoding.
Returns:
the size of the object when it is encoded.

encode

public void encode(SWFEncoder coder,
                   Context context)
            throws IOException
Encode an object to the Flash binary format.

Specified by:
encode in interface SWFEncodeable
Parameters:
coder - an SWFEncoder object.
context - an Context that allows information to be passed between objects to control how they are initialised for encoding.
Throws:
IOException - if an error occurs while encoding the object.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.