com.melloware.jukes.file.tag
Class ApeFileTag
java.lang.Object
com.melloware.jukes.file.tag.MusicTag
com.melloware.jukes.file.tag.ApeFileTag
- All Implemented Interfaces:
- ITag, Comparable
public final class ApeFileTag
- extends MusicTag
MusicTag class used for editing APE file tags.
The Entagged (http://entagged.sourceforge.net/) library is used to read these
types of Tags.
Copyright (c) 2006 Melloware, Inc.
- Version:
- 4.0
AZ (C) 2010
- Author:
- Emil A. Lefkof III
| Fields inherited from class com.melloware.jukes.file.tag.MusicTag |
artist, bitRate, comment, CURRENT_YEAR, DEFAULT_FILE_FORMAT, disc, encodedBy, file, genre, header, NO_TAG, settings, title, track, trackLength, year |
|
Constructor Summary |
ApeFileTag(File aFile)
Constructor that accepts a file. |
| Methods inherited from class com.melloware.jukes.file.tag.MusicTag |
compareTo, createFilenameFromFormat, equals, extractTitleFromFilename, fileExists, getAbsolutePath, getBitRateAsString, getFile, getGenreTypes, getHeaderInfo, getHeaderValue, getStandardGenreType, getTrackLengthAsString, hashCode, renameFile, setSettings, synchronize, toString |
ApeFileTag
public ApeFileTag(File aFile)
throws MusicTagException
- Constructor that accepts a file.
- Parameters:
aFile - the file to open
- Throws:
MusicTagException - if any error occurs loading tag
getArtist
public String getArtist()
- Description copied from class:
MusicTag
- Gets the artist.
- Specified by:
getArtist in interface ITag- Specified by:
getArtist in class MusicTag
- Returns:
- Returns the artist.
getBitRate
public Long getBitRate()
- Description copied from class:
MusicTag
- Gets the bitRate.
- Specified by:
getBitRate in interface ITag- Specified by:
getBitRate in class MusicTag
- Returns:
- Returns the bitRate.
getComment
public String getComment()
- Description copied from class:
MusicTag
- Gets the comment.
- Specified by:
getComment in interface ITag- Specified by:
getComment in class MusicTag
- Returns:
- Returns the comment.
getCopyrighted
public String getCopyrighted()
- Specified by:
getCopyrighted in interface ITag- Specified by:
getCopyrighted in class MusicTag
getDisc
public String getDisc()
- Description copied from class:
MusicTag
- Gets the disc.
- Specified by:
getDisc in interface ITag- Specified by:
getDisc in class MusicTag
- Returns:
- Returns the disc.
getEmphasis
public String getEmphasis()
- Specified by:
getEmphasis in interface ITag- Specified by:
getEmphasis in class MusicTag
getEncodedBy
public String getEncodedBy()
- Description copied from class:
MusicTag
- Gets the encodedBy.
- Specified by:
getEncodedBy in interface ITag- Specified by:
getEncodedBy in class MusicTag
- Returns:
- Returns the encodedBy.
getFrequency
public String getFrequency()
- Specified by:
getFrequency in interface ITag- Specified by:
getFrequency in class MusicTag
getGenre
public String getGenre()
- Description copied from class:
MusicTag
- Gets the genre.
- Specified by:
getGenre in interface ITag- Specified by:
getGenre in class MusicTag
- Returns:
- Returns the genre.
getHeader
public Map getHeader()
- Description copied from class:
MusicTag
- Gets the header.
- Specified by:
getHeader in interface ITag- Specified by:
getHeader in class MusicTag
- Returns:
- Returns the header.
getLayer
public String getLayer()
- Specified by:
getLayer in interface ITag- Specified by:
getLayer in class MusicTag
getMode
public String getMode()
- Specified by:
getMode in interface ITag- Specified by:
getMode in class MusicTag
getTitle
public String getTitle()
- Description copied from class:
MusicTag
- Gets the title.
- Specified by:
getTitle in interface ITag- Specified by:
getTitle in class MusicTag
- Returns:
- Returns the title.
getTrack
public String getTrack()
- Description copied from class:
MusicTag
- Gets the track.
- Specified by:
getTrack in interface ITag- Specified by:
getTrack in class MusicTag
- Returns:
- Returns the track.
getTrackLength
public long getTrackLength()
- Description copied from class:
MusicTag
- Gets the trackLength.
- Specified by:
getTrackLength in interface ITag- Specified by:
getTrackLength in class MusicTag
- Returns:
- Returns the trackLength.
getVersion
public String getVersion()
- Specified by:
getVersion in interface ITag- Specified by:
getVersion in class MusicTag
getYear
public String getYear()
- Description copied from class:
MusicTag
- Gets the year.
- Specified by:
getYear in interface ITag- Specified by:
getYear in class MusicTag
- Returns:
- Returns the year.
setArtist
public void setArtist(String aArtist)
- Description copied from class:
MusicTag
- Sets the artist.
- Specified by:
setArtist in interface ITag- Specified by:
setArtist in class MusicTag
- Parameters:
aArtist - The artist to set.
setComment
public void setComment(String aComment)
- Description copied from class:
MusicTag
- Sets the comment.
- Specified by:
setComment in interface ITag- Specified by:
setComment in class MusicTag
- Parameters:
aComment - The comment to set.
setDisc
public void setDisc(String aDisc)
- Description copied from class:
MusicTag
- Sets the disc.
- Specified by:
setDisc in interface ITag- Specified by:
setDisc in class MusicTag
- Parameters:
aDisc - The disc to set.
setEncodedBy
public void setEncodedBy(String aEncodedBy)
- Description copied from class:
MusicTag
- Sets the encodedBy.
- Specified by:
setEncodedBy in interface ITag- Specified by:
setEncodedBy in class MusicTag
- Parameters:
aEncodedBy - The encodedBy to set.
setGenre
public void setGenre(String aGenre)
- Description copied from class:
MusicTag
- Sets the genre.
- Specified by:
setGenre in interface ITag- Specified by:
setGenre in class MusicTag
- Parameters:
aGenre - The genre to set.
setTitle
public void setTitle(String aTitle)
- Description copied from class:
MusicTag
- Sets the title.
- Specified by:
setTitle in interface ITag- Specified by:
setTitle in class MusicTag
- Parameters:
aTitle - The title to set.
setTrack
public void setTrack(String aTrack)
- Description copied from class:
MusicTag
- Sets the track.
- Specified by:
setTrack in interface ITag- Specified by:
setTrack in class MusicTag
- Parameters:
aTrack - The track to set.
setTrack
public void setTrack(String aTrack,
int aPadding)
- Sets the track.
- Specified by:
setTrack in interface ITag- Specified by:
setTrack in class MusicTag
- Parameters:
aTrack - The track to set.aPadding - the number of 0's to pad this track with
setTrackLength
public void setTrackLength(long aTrackLength)
- Description copied from class:
MusicTag
- Sets the trackLength.
- Specified by:
setTrackLength in class MusicTag
- Parameters:
aTrackLength - The trackLength to set.
setYear
public void setYear(String aYear)
- Description copied from class:
MusicTag
- Sets the year.
- Specified by:
setYear in interface ITag- Specified by:
setYear in class MusicTag
- Parameters:
aYear - The year to set.
isVBR
public boolean isVBR()
- Specified by:
isVBR in interface ITag- Specified by:
isVBR in class MusicTag
removeTags
public void removeTags()
throws MusicTagException
- Description copied from class:
MusicTag
- Removes tags from the audio file.
- Specified by:
removeTags in class MusicTag
- Throws:
MusicTagException - if any error occurs removing the tag
renameFile
public boolean renameFile(String aFormat)
- Renames this Music file based on a format from prefs. The format is in
aFormat and can have values %n for track number, %t for title, %a for
artist, and %d for disc. Replaces any invalid characters (\\, /, :, , *, ?, ", <, >,
or |) with underscores _ to prevent any errors on file systems. Examples:
%n -%t = 01 - Track.mp3 %a - %d - %n - %t = Artist - Album - 01 -
Track.mp3
- Specified by:
renameFile in class MusicTag
- Parameters:
aFormat - the string format like %n -%t to rename 01 - Track.mp3
- Returns:
- true if renamed, false if failure
save
public void save()
throws MusicTagException
- Description copied from class:
MusicTag
- Saves the tag back to the file.
- Specified by:
save in class MusicTag
- Throws:
MusicTagException - if any error occurs saving the file
Copyright © 1999-2010 Melloware Inc. All Rights Reserved.