Logo Search packages:      
Sourcecode: jampal version File versions  Download package

Public Member Functions | Static Public Member Functions | Static Public Attributes | Package Attributes | Static Package Attributes | Private Member Functions | Private Attributes

pgbennett::id3::MP3File Class Reference

Collaboration diagram for pgbennett::id3::MP3File:
Collaboration graph

List of all members.

Public Member Functions

int compareTo (Object o)
boolean doesFrameExist (String id)
boolean equals (Object o)
String getAlbum () throws ID3v2FormatException
String getArtist () throws ID3v2FormatException
int getBitRate ()
String getComment () throws ID3v2FormatException
String getComposer () throws ID3v2FormatException
String getCopyrightInfo () throws ID3v2FormatException
String getEncodedBy () throws ID3v2FormatException
String getFileName ()
long getFileSize ()
byte[] getFrameDataBytes (String id)
String getFrameDataString (String id) throws ID3v2FormatException
String getFrameIds ()
String getGenre () throws ID3v2FormatException
MPEGAudioFrameHeader getHeader ()
ID3v1Tag getID3v1Tag ()
ID3v2Tag getID3v2Tag ()
String getMp3Binary (String id) throws Exception
String getMp3Field (int fieldType, String id) throws Exception
File getMp3File ()
String getMp3Integer (String id) throws Exception
ID3v2Picture getMp3Picture (String id) throws Exception
String getMPEGChannelMode ()
String getMPEGEmphasis ()
String getMPEGLayer ()
long getMpegLocation ()
String getMPEGVersion ()
int getNumTracks () throws ID3v2FormatException
String getOriginalArtist () throws ID3v2FormatException
String getParent ()
String getPath ()
long getPlayingTime ()
long getPlayingTimeMs ()
String getPlayingTimeString ()
int getSampleRate ()
int getTaggingType ()
int getTagSize ()
int getTagSize (int type)
String getTitle () throws ID3v2FormatException
int getTrack () throws ID3v2FormatException
String getTrackString () throws ID3v2FormatException
String getUserDefinedURL () throws ID3v2FormatException
String getYear () throws ID3v2FormatException
boolean id3v1Exists ()
boolean id3v2Exists ()
void init (File mp3, int tagType) throws FileNotFoundException, NoMPEGFramesException, IOException, ID3v2FormatException, CorruptHeaderException, ID3Exception
void init (File mp3, int tagType, int offset) throws FileNotFoundException, NoMPEGFramesException, IOException, ID3v2FormatException, CorruptHeaderException, ID3Exception
boolean isMP3 ()
boolean isMPEGCopyrighted ()
boolean isMPEGOriginal ()
boolean isMPEGPrivate ()
boolean isMPEGProtected ()
boolean isVBR ()
 MP3File (File mp3) throws FileNotFoundException, NoMPEGFramesException, IOException, ID3Exception
 MP3File (File mp3, int tagType) throws FileNotFoundException, NoMPEGFramesException, IOException, ID3Exception
 MP3File (String fn, int tagType) throws FileNotFoundException, NoMPEGFramesException, IOException, ID3Exception
 MP3File (String fn) throws FileNotFoundException, NoMPEGFramesException, IOException, ID3Exception
void removeTags (int type) throws FileNotFoundException, IOException
void setAlbum (String album)
void setArtist (String artist)
void setComment (String comment)
void setComposer (String composer)
void setCopyrightInfo (String copyright)
void setEncodedBy (String encBy)
void setFrameData (String id, byte[] data) throws UnsupportedEncodingException
void setGenre (String genre)
void setMp3Field (int fieldType, String id, String Language, String Description, String value) throws Exception
void setMp3Integer (String id, String value) throws Exception
void setMp3Picture (String id, ID3v2Picture pic) throws Exception
void setOriginalArtist (String artist)
void setTaggingType (int newType)
void setTextFrame (String id, String data)
void setTitle (String title)
void setTrack (int track)
void setTrack (String track) throws NumberFormatException
void setUserDefinedText (String desc, String text)
void setUserDefinedURL (String desc, String url)
void setYear (String year)
void syncV1AndV2 () throws ID3v2FormatException
String toString ()
void writeTags () throws FileNotFoundException, IOException

Static Public Member Functions

static String fileNameReplacements (String fileName)

Static Public Attributes

static final int BOTH_TAGS = 0
static final int COL_ALBUM = 23
static final int COL_ARTIST = 22
static final int COL_BITRATE = 3
static final int COL_CHANNELMODE = 10
static final int COL_COMMENT = 25
static final int COL_COPYRIGHTED = 11
static final int COL_CRC = 13
static final int COL_DUMMY = 28
static final int COL_EMPHASIS = 14
static final int COL_FILENAME = 1
static final int COL_FILESIZE = 5
static final int COL_FRAMES = 29
static final int COL_GENRE = 27
static final int COL_ID3V2TAG = 2
static final int COL_MPEGVERSION = 7
static final int COL_ORIGINAL = 12
static final int COL_PLAYINGTIME = 4
static final int COL_PLAYINGTIMEMS = 8
static final int COL_PRIVATEBIT = 16
static final int COL_SAMPLERATE = 9
static final int COL_TITLE = 21
static final int COL_TRACK = 26
static final int COL_VBR = 19
static final int COL_YEAR = 24
static final String[] columnTypeDescs
static final int[] columnTypes
static final int EXISTING_TAGS_ONLY = 4
static final int ID3V1_ONLY = 2
static final int ID3V2_ONLY = 1
static final int NO_TAGS = 3

Package Attributes

int avgBitRate
final int numSamples = 20

Static Package Attributes

static Pattern atPattern = Pattern.compile("\\@")
static Pattern dollarPattern = Pattern.compile("\\$")
static Pattern fixIdPattern = Pattern.compile("[\0\n\t\r ]")
static Pattern percentPattern = Pattern.compile("\\%")
static Pattern underscorePattern = Pattern.compile("_")

Private Member Functions

boolean allow (int tagVersion)
boolean allow (int tagVersion, int type)

Private Attributes

MPEGAudioFrameHeader head = null
final int ID3V1 = 5
ID3v1Tag id3v1 = null
final int ID3V2 = 6
ID3v2Tag id3v2 = null
File mp3 = null
int tagType = 0

Detailed Description

Description: This class is a container of all the tags and data that can be extracted from the mp3 specified by the file. If there are no id3 tags present, tags will be created by using mutators and saving the data.

Version History
1.8.1 - 2002.1023 by gruni
-Made Sourcecode compliant to the Sun CodingConventions
1.8 - 2002.0131 by helliker
Added methods to get tag sizes.
1.7 - 2002.0127 by helliker
-Added methods to access additional MPEG data. -Added methods to parse track data. -Comparisons with compareTo uses pathnames now.
1.6 - 2002.0124 by helliker
-Avoids a divide by zero possibility.
1.5 - 2002.0121 by helliker
-Added support for VBR files.
1.4 - 2002.0120 by helliker
Change to ID3v2Tag ctor
1.3 - 2001.1028 by helliker
-Writes id3v2 tags before id3v1 tags. This fixes a bug where if the filesize is changed when the id3v2 tag is written out then the id3v1 tag will not be at the end of the file and won't be recognized.
1.2 - 2001.1019 by helliker
All set for release.
Jonathan Hilliker

Definition at line 65 of file MP3File.java.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index