org.stanwood.media.store.mp4
Interface IMP4Manager

All Known Implementing Classes:
MP4AtomicParsleyManager

public interface IMP4Manager

This interface should be implemented by classes that manager mp4 files


Method Summary
 IAtom createAtom(MP4AtomKey name, boolean value)
          Used to create a atom
 IAtom createAtom(MP4AtomKey name, int value)
          Used to create a number atom
 IAtom createAtom(MP4AtomKey name, MP4ArtworkType type, int size, byte[] data)
          Used to create a artwork atom
 IAtom createAtom(MP4AtomKey name, short number, short total)
          Used to create a range atom
 IAtom createAtom(MP4AtomKey name, java.lang.String value)
          Used to create a atom
 java.io.File getArtworkFile(java.net.URL imageUrl)
          Used to download the artwork from a URL to a file
 void init(java.io.File nativeDir)
          Used to setup the manager
 java.util.List<IAtom> listAtoms(java.io.File mp4File)
          Used to get a list of atoms in the MP4 file.
 void setParameter(java.lang.String key, java.lang.String value)
          Used to set parameters on the manager
 void update(java.io.File mp4File, java.util.List<IAtom> atoms)
          Used to add atoms to a MP4 file.
 

Method Detail

listAtoms

java.util.List<IAtom> listAtoms(java.io.File mp4File)
                                throws MP4Exception
Used to get a list of atoms in the MP4 file.

Parameters:
mp4File - The MP4 file
Returns:
A list of atoms
Throws:
MP4Exception - Thrown if their is a problem reading the MP4 file

update

void update(java.io.File mp4File,
            java.util.List<IAtom> atoms)
            throws MP4Exception
Used to add atoms to a MP4 file.

Parameters:
mp4File - The MP4 file
atoms - The atoms to add to the file
Throws:
MP4Exception - Thrown if their is a problem updating the atoms

createAtom

IAtom createAtom(MP4AtomKey name,
                 java.lang.String value)
Used to create a atom

Parameters:
name - The name of the atom
value - The value of the atom
Returns:
the atom

createAtom

IAtom createAtom(MP4AtomKey name,
                 boolean value)
Used to create a atom

Parameters:
name - The name of the atom
value - The value of the atom
Returns:
the atom

createAtom

IAtom createAtom(MP4AtomKey name,
                 short number,
                 short total)
Used to create a range atom

Parameters:
name - The name of the atom
number - The number of items in the rage
total - The total number possible
Returns:
The atom

createAtom

IAtom createAtom(MP4AtomKey name,
                 int value)
Used to create a number atom

Parameters:
name - The name of the atom
value - The value of the atom
Returns:
The atom

createAtom

IAtom createAtom(MP4AtomKey name,
                 MP4ArtworkType type,
                 int size,
                 byte[] data)
Used to create a artwork atom

Parameters:
name - The name of the atom
type - The artwork type
size - The size of the artwork
data - The data in the artwork
Returns:
The atom

init

void init(java.io.File nativeDir)
          throws MP4Exception
Used to setup the manager

Parameters:
nativeDir - The native folder been used or configured. Null if can't be found
Throws:
MP4Exception - Thrown if their is a problem setup up the manager

setParameter

void setParameter(java.lang.String key,
                  java.lang.String value)
Used to set parameters on the manager

Parameters:
key - The key of the parameter
value - The name of the parameter

getArtworkFile

java.io.File getArtworkFile(java.net.URL imageUrl)
                            throws java.io.IOException
Used to download the artwork from a URL to a file

Parameters:
imageUrl - The file URL
Returns:
The file
Throws:
java.io.IOException - Thrown if their are any problems downloading the file