org.stanwood.media.store.mp4.atomicparsley
Class AbstractAPAtom

java.lang.Object
  extended by org.stanwood.media.store.mp4.atomicparsley.AbstractAPAtom
All Implemented Interfaces:
IAtom
Direct Known Subclasses:
APAtomArtwork, APAtomArtworkSummary, APAtomBoolean, APAtomNumber, APAtomRange, APAtomString

public abstract class AbstractAPAtom
extends java.lang.Object
implements IAtom

Base class for atoms


Constructor Summary
AbstractAPAtom(MP4AtomKey key)
          The constructor
 
Method Summary
 void cleanup()
          Called after processing the atom to clean up any used resources
 java.lang.String getDisplayName()
          Gets the display name
 MP4AtomKey getKey()
          Used to get the atom key
 java.lang.String getName()
          Used to get the name of the atom
abstract  void writeAtom(java.io.File mp4File, boolean extended, java.util.List<java.lang.Object> args)
          Used to get the arguments need to write a atom to the mp4 file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAPAtom

public AbstractAPAtom(MP4AtomKey key)
The constructor

Parameters:
key - The key of the atom
Method Detail

getDisplayName

public java.lang.String getDisplayName()
Gets the display name

Specified by:
getDisplayName in interface IAtom
Returns:
the display name

getName

public java.lang.String getName()
Used to get the name of the atom

Specified by:
getName in interface IAtom
Returns:
The name of the atom

getKey

public MP4AtomKey getKey()
Used to get the atom key

Specified by:
getKey in interface IAtom
Returns:
The atom key

writeAtom

public abstract void writeAtom(java.io.File mp4File,
                               boolean extended,
                               java.util.List<java.lang.Object> args)
                        throws MP4Exception
Used to get the arguments need to write a atom to the mp4 file

Parameters:
mp4File - The mp4 file
extended - Is this a newer version of the tool
args - The argument list to add to
Throws:
MP4Exception - Thrown if their are any problems

cleanup

public void cleanup()
             throws MP4Exception
Called after processing the atom to clean up any used resources

Throws:
MP4Exception - Thrown if their is a problem