com.tuneology.avm
Class InfoReader

java.lang.Object
  |
  +--com.tuneology.avm.InfoReader

public class InfoReader
extends java.lang.Object

This class is used to read and write meta-information to media files.

Version:
$Id: InfoReader.java,v 1.14 2003/07/10 19:52:12 xnarf Exp $
Author:
Fran Taylor

Constructor Summary
InfoReader()
           
 
Method Summary
static long calculateSize(DiscInfo info, FormatPrefs prefs)
          Returns the size that the album will have after it has been converted according to the specified preferences.
static long calculateSize(TocEntry ent, FormatPrefs prefs)
          Returns the size that the file will have after it has been converted according to the specified preferences.
static java.lang.String[] getId3GenreArray()
          Returns the list of ID3 genres.
static java.util.ArrayList getMetaflacCmd()
           
static java.util.ArrayList getOggInfoCmd()
           
static java.lang.String getVersions()
           
static void readFileInfo(java.io.File f, TocEntry info)
          Reads header information from the specified file and fills in the supplied TocEntry object.
static void setMetaflacCmd(java.lang.String cmd)
          Sets the path for the metaflac command.
static void setOggInfoCmd(java.lang.String cmd)
          Sets the path for the ogginfo command.
static void writeInfo(java.io.File f, TocEntry ent)
          Writes changed meta-info to the music file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InfoReader

public InfoReader()
Method Detail

calculateSize

public static long calculateSize(TocEntry ent,
                                 FormatPrefs prefs)
Returns the size that the file will have after it has been converted according to the specified preferences.
Parameters:
ent -  
prefs -  
Returns:
the estimated size in bytes.

calculateSize

public static long calculateSize(DiscInfo info,
                                 FormatPrefs prefs)
Returns the size that the album will have after it has been converted according to the specified preferences.
Parameters:
info -  
prefs -  
Returns:
the estimages size in bytes;

readFileInfo

public static void readFileInfo(java.io.File f,
                                TocEntry info)
                         throws java.lang.Exception
Reads header information from the specified file and fills in the supplied TocEntry object.

writeInfo

public static void writeInfo(java.io.File f,
                             TocEntry ent)
                      throws java.lang.Exception
Writes changed meta-info to the music file. Currently only supports MP3.

getOggInfoCmd

public static java.util.ArrayList getOggInfoCmd()
Returns:
the command for running ogginfo.

setOggInfoCmd

public static void setOggInfoCmd(java.lang.String cmd)
                          throws java.lang.Exception
Sets the path for the ogginfo command.
Parameters:
cmd - the command for running ogginfo.

getMetaflacCmd

public static java.util.ArrayList getMetaflacCmd()
Returns:
the command for running metaflac.

setMetaflacCmd

public static void setMetaflacCmd(java.lang.String cmd)
                           throws java.lang.Exception
Sets the path for the metaflac command.
Parameters:
cmd - the command for running metaflac.

getVersions

public static java.lang.String getVersions()

getId3GenreArray

public static java.lang.String[] getId3GenreArray()
Returns the list of ID3 genres.
Returns:
a string array of ID3 genres.