Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.tuneology.avm
Class InfoReader  view InfoReader download InfoReader.java

java.lang.Object
  extended bycom.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.6 2002/11/05 08:15:32 xnarf Exp $

Field Summary
private static int[] brateList
           
private static java.lang.String encoding
           
private static java.lang.String[] genreArray
           
private static java.lang.String oggInfoCmd
           
 
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.
private static void encodeString(byte[] buf, int pos, java.lang.String str, int len)
           
private static int getBytesPerSec(byte[] wavbuf)
           
private static java.lang.String getGenre(int genre)
           
static java.lang.String[] getId3GenreArray()
          Returns the list of ID3 genres.
private static int getInt(byte[] wavbuf, int ind)
           
private static int getLen(byte[] wavbuf)
           
static java.util.Vector getOggInfoCmd()
           
private static java.lang.String getString(byte[] tag, int p1, int p2)
           
private static int parseInt(java.lang.String str, int defval)
           
private static void processOggInfoKey(TocEntry ent, java.lang.String key, java.lang.String val)
          This function processes the name/value pairs produced by ogginfo.
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 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
 

Field Detail

oggInfoCmd

private static java.lang.String oggInfoCmd

encoding

private static final java.lang.String encoding
See Also:
Constant Field Values

genreArray

private static final java.lang.String[] genreArray

brateList

private static int[] brateList
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.


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.


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.Vector getOggInfoCmd()

setOggInfoCmd

public static void setOggInfoCmd(java.lang.String cmd)
Sets the path for the ogginfo command.


getId3GenreArray

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


parseInt

private static int parseInt(java.lang.String str,
                            int defval)

getGenre

private static java.lang.String getGenre(int genre)

getString

private static java.lang.String getString(byte[] tag,
                                          int p1,
                                          int p2)

encodeString

private static void encodeString(byte[] buf,
                                 int pos,
                                 java.lang.String str,
                                 int len)

getInt

private static int getInt(byte[] wavbuf,
                          int ind)

getLen

private static int getLen(byte[] wavbuf)

getBytesPerSec

private static int getBytesPerSec(byte[] wavbuf)

processOggInfoKey

private static void processOggInfoKey(TocEntry ent,
                                      java.lang.String key,
                                      java.lang.String val)
This function processes the name/value pairs produced by ogginfo.