com.tuneology.avm
Class TocEntry

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

public class TocEntry
extends java.lang.Object

Describes a track or a file on a CD, including CD-TEXT info, if present. Can be an audio track, a data track, or a file on a CD-Extra disc.

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

Constructor Summary
TocEntry()
           
TocEntry(DiscInfo i)
           
 
Method Summary
 TocEntry copy()
           
 int getAdr()
          the adr field for the track
 java.lang.String getAlbum()
          read from CD-TEXT, if present
 java.lang.String getAlbumPath()
          The album name, with all strange characters replaced by '_'.
 java.lang.String getArranger()
           
 java.lang.String getArtist()
          read from CD-TEXT, if present
 java.lang.String getArtistPath()
          The artist's name, with all strange characters replaced by '_'.
 int getChannels()
          the number of channels
 java.lang.String getComment()
           
 long getFileSize()
           
 int getFormat()
          the format of the track
 int getFrame()
          the index of the beginning of the track
 java.lang.String getGenre()
           
 java.lang.String getIsrc()
          the ISRC entry for the track
 int getLen()
          the length of the track in 1/75 secs
 java.lang.String getLyrics()
           
 int getMode()
          the mode of the track
 java.lang.String getPath()
          valid on MacOS, which makes a virtual file system of the CD's contents
 int getRate()
          bit rate, in bits/second
 int getSession()
          the session number
 java.lang.String getSongwriter()
           
 java.lang.String getTitle()
          read from CD-TEXT, if present
 java.lang.String getTitlePath()
          The song title, with all strange characters replaced by '_'.
 int getTrack()
          the track number
 int getType()
          the type of the track
 int getYear()
           
 boolean isInitialized()
          true if this information had been set
static java.lang.String pathString(java.lang.String s)
          Replaces questionable filename characters with '_'.
 void setAdr(int a)
          the adr field for the track
 void setAlbum(java.lang.String a)
          set the name of the album the track is on
 void setArranger(java.lang.String a)
           
 void setArtist(java.lang.String a)
          read from CD-TEXT, if present
 void setChannels(int s)
          the number of channels
 void setComment(java.lang.String c)
           
 void setFileSize(long s)
           
 void setFormat(int f)
          the format of the track
 void setFrame(int f)
          the index of the beginning of the track
 void setGenre(java.lang.String g)
           
 void setInitialized(boolean b)
          true if this information had been set
 void setIsrc(java.lang.String i)
          the ISRC entry for the track
 void setLen(int l)
          the length of the track in 1/75 secs
 void setLyrics(java.lang.String l)
           
 void setMode(int m)
          the mode of the track
 void setPath(java.lang.String p)
           
 void setRate(int r)
          bit rate, in bits/second
 void setSession(int s)
          the session number
 void setSongwriter(java.lang.String s)
           
 void setTitle(java.lang.String t)
          set the title of the track
 void setTrack(int t)
          Sets the track number.
 void setType(int t)
           
 void setYear(int y)
           
static void touch()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TocEntry

public TocEntry()

TocEntry

public TocEntry(DiscInfo i)
Method Detail

copy

public TocEntry copy()

getType

public int getType()
the type of the track

getFormat

public int getFormat()
the format of the track

getAdr

public int getAdr()
the adr field for the track

getMode

public int getMode()
the mode of the track

getFrame

public int getFrame()
the index of the beginning of the track

getLen

public int getLen()
the length of the track in 1/75 secs

getTrack

public int getTrack()
the track number

getSession

public int getSession()
the session number

getChannels

public int getChannels()
the number of channels

getIsrc

public java.lang.String getIsrc()
the ISRC entry for the track

getArtist

public java.lang.String getArtist()
read from CD-TEXT, if present

getAlbum

public java.lang.String getAlbum()
read from CD-TEXT, if present

getTitle

public java.lang.String getTitle()
read from CD-TEXT, if present

getRate

public int getRate()
bit rate, in bits/second

getFileSize

public long getFileSize()

getPath

public java.lang.String getPath()
valid on MacOS, which makes a virtual file system of the CD's contents

getComment

public java.lang.String getComment()

getArranger

public java.lang.String getArranger()

getSongwriter

public java.lang.String getSongwriter()

getGenre

public java.lang.String getGenre()

getLyrics

public java.lang.String getLyrics()

getYear

public int getYear()

isInitialized

public boolean isInitialized()
true if this information had been set

setType

public void setType(int t)

setFormat

public void setFormat(int f)
the format of the track

setAdr

public void setAdr(int a)
the adr field for the track

setMode

public void setMode(int m)
the mode of the track

setFrame

public void setFrame(int f)
the index of the beginning of the track

setLen

public void setLen(int l)
the length of the track in 1/75 secs

setTrack

public void setTrack(int t)
              throws java.lang.IndexOutOfBoundsException
Sets the track number.
Parameters:
t -  
Throws:
java.lang.IndexOutOfBoundsException -  

setSession

public void setSession(int s)
the session number

setChannels

public void setChannels(int s)
the number of channels

setIsrc

public void setIsrc(java.lang.String i)
the ISRC entry for the track

setArtist

public void setArtist(java.lang.String a)
read from CD-TEXT, if present

setAlbum

public void setAlbum(java.lang.String a)
set the name of the album the track is on

setTitle

public void setTitle(java.lang.String t)
set the title of the track

setRate

public void setRate(int r)
bit rate, in bits/second

setFileSize

public void setFileSize(long s)

setPath

public void setPath(java.lang.String p)

setComment

public void setComment(java.lang.String c)

setArranger

public void setArranger(java.lang.String a)

setSongwriter

public void setSongwriter(java.lang.String s)

setGenre

public void setGenre(java.lang.String g)

setLyrics

public void setLyrics(java.lang.String l)

setYear

public void setYear(int y)

setInitialized

public void setInitialized(boolean b)
true if this information had been set

getArtistPath

public java.lang.String getArtistPath()
The artist's name, with all strange characters replaced by '_'.
Returns:
the artist's name, with all strange characters replaced by '_'.

getAlbumPath

public java.lang.String getAlbumPath()
The album name, with all strange characters replaced by '_'.
Returns:
the album name, with all strange characters replaced by '_'.

getTitlePath

public java.lang.String getTitlePath()
The song title, with all strange characters replaced by '_'.
Returns:
the song title, with all strange characters replaced by '_'.

pathString

public static java.lang.String pathString(java.lang.String s)
Replaces questionable filename characters with '_'.
Parameters:
s - the input string.
Returns:
string with nasty characters changed to '_'.

touch

public static void touch()