|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.File
net.sourceforge.atunes.kernel.modules.repository.audio.AudioFile
public class AudioFile
AudioFile class initializes audio files so tags and audio information can be retrieved by tagging library. Provides information about bitrate, duration and frequency of the audio file. Provides tag informations.
| Field Summary | |
|---|---|
static java.lang.String |
APE_FORMAT
The Constant APE_FORMAT. |
static java.lang.String |
FLAC_FORMAT
The Constant FLAC_FORMAT. |
static java.lang.String |
MAC_FORMAT
The Constant MAC_FORMAT. |
static java.lang.String |
MP3_FORMAT
The Constant MP3_FORMAT. |
static java.lang.String |
MP4_FORMAT_1
The Constant MP4_FORMAT_1. |
static java.lang.String |
MP4_FORMAT_2
The Constant MP4_FORMAT_2. |
static java.lang.String |
MP4_FORMAT_3
The Constant MP4_FORMAT_3. |
static java.lang.String |
MPC_FORMAT
The Constant MPC_FORMAT. |
static java.lang.String |
MPplus_FORMAT
The Constant MPplus_FORMAT. |
static java.lang.String |
OGG_FORMAT
The Constant OGG_FORMAT. |
static java.lang.String |
REALAUDIO_FORMAT
The Constant REALAUDIO_FORMAT. |
static java.lang.String |
REALAUDIO_FORMAT_2
The Constant REALAUDIO_FORMAT_2. |
static java.lang.String |
WAV_FORMAT
The Constant WAV_FORMAT. |
static java.lang.String |
WMA_FORMAT
The Constant WMA_FORMAT. |
| Fields inherited from class java.io.File |
|---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
| Constructor Summary | |
|---|---|
AudioFile(java.lang.String fileName)
Instantiates a new audio file. |
|
| Method Summary | |
|---|---|
void |
addExternalPicture(java.io.File picture)
Adds the external picture. |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getAbsolutePath()
Deprecated. |
java.lang.String |
getAlbum()
Gets the album. |
java.lang.String |
getAlbumArtist()
Gets the album artist. |
java.lang.String |
getArtist()
Gets the artist. |
static java.util.List<AudioFile> |
getAudioFiles(java.util.List<AudioObject> audioObjects)
Gets the audio files. |
long |
getBitrate()
Gets the bitrate. |
java.lang.String |
getComposer()
Gets the composer. |
long |
getDuration()
Gets the duration. |
java.util.List<java.io.File> |
getExternalPictures()
Gets the external pictures. |
int |
getExternalPicturesCount()
Gets the external pictures count. |
int |
getFrequency()
Gets the frequency. |
java.lang.String |
getGenre()
Gets the genre. |
java.lang.String |
getLyrics()
Gets the lyrics. |
java.lang.String |
getNameWithoutExtension()
Gets the name without extension. |
static Tag |
getNewTag(AudioFile file,
java.util.Map<java.lang.String,?> properties)
Gets the new tag. |
int |
getStars()
Gets the stars. |
Tag |
getTag()
Gets the tag. |
java.lang.String |
getTitle()
Gets the title. |
java.lang.String |
getTitleOrFileName()
Gets the title or file name. |
java.lang.Integer |
getTrackNumber()
Gets the track number. |
java.lang.String |
getUrl()
Gets the url. |
java.lang.String |
getYear()
Gets the year. |
int |
hashCode()
|
boolean |
hasInternalPicture()
Checks for internal picture. |
static boolean |
isApeFile(java.io.File file)
Checks if is ape file. |
static boolean |
isFlacFile(java.io.File file)
Checks if is flac file. |
static boolean |
isMp3File(java.io.File file)
Checks if is mp3 file. |
static boolean |
isMp4File(java.io.File file)
Checks if is mp4 file. |
static boolean |
isMPCFile(java.io.File file)
Checks if is mPC file. |
static boolean |
isOggFile(java.io.File file)
Checks if is ogg file. |
static boolean |
isRealAudioFile(java.io.File file)
Checks if is real audio file. |
boolean |
isSeekable()
Checks if is seekable. |
boolean |
isUpToDate()
Checks if is up to date. |
static boolean |
isValidAudioFile(java.io.File file)
Checks if is valid audio file. |
static boolean |
isValidAudioFile(java.lang.String file)
Checks if is valid audio file. |
static boolean |
isWavFile(java.io.File file)
Checks if is wav file. |
static boolean |
isWmaFile(java.io.File file)
Checks if is wma file. |
void |
refreshTag()
Refresh tag. |
void |
setExternalPictures(java.util.List<java.io.File> externalPictures)
Sets the external pictures. |
void |
setStars(int stars)
Sets the stars. |
void |
setTag(Tag tag)
Sets the tag. |
void |
setWritable()
Sets write permissions if is not writable. |
java.lang.String |
toString()
|
| Methods inherited from class java.io.File |
|---|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, exists, getAbsoluteFile, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toURI, toURL |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MP3_FORMAT
public static final java.lang.String OGG_FORMAT
public static final java.lang.String MP4_FORMAT_1
public static final java.lang.String MP4_FORMAT_2
public static final java.lang.String MP4_FORMAT_3
public static final java.lang.String WAV_FORMAT
public static final java.lang.String WMA_FORMAT
public static final java.lang.String FLAC_FORMAT
public static final java.lang.String APE_FORMAT
public static final java.lang.String MPC_FORMAT
public static final java.lang.String REALAUDIO_FORMAT
public static final java.lang.String REALAUDIO_FORMAT_2
public static final java.lang.String MPplus_FORMAT
public static final java.lang.String MAC_FORMAT
| Constructor Detail |
|---|
public AudioFile(java.lang.String fileName)
fileName - the file name| Method Detail |
|---|
public static java.util.List<AudioFile> getAudioFiles(java.util.List<AudioObject> audioObjects)
audioObjects - the audio objects
public static Tag getNewTag(AudioFile file,
java.util.Map<java.lang.String,?> properties)
file - the fileproperties - the properties
public static boolean isApeFile(java.io.File file)
file - the file
public static boolean isFlacFile(java.io.File file)
file - the file
public static boolean isMp3File(java.io.File file)
file - the file
public static boolean isMp4File(java.io.File file)
file - the file
public static boolean isMPCFile(java.io.File file)
file - the file
public static boolean isOggFile(java.io.File file)
file - the file
public static boolean isRealAudioFile(java.io.File file)
file - the file
public static boolean isValidAudioFile(java.io.File file)
file - the file
public static boolean isValidAudioFile(java.lang.String file)
file - the file
public static boolean isWavFile(java.io.File file)
file - the file
public static boolean isWmaFile(java.io.File file)
file - the file
public void addExternalPicture(java.io.File picture)
picture - the picturepublic boolean equals(java.lang.Object o)
equals in class java.io.File@Deprecated public java.lang.String getAbsolutePath()
getAbsolutePath in class java.io.Filepublic java.lang.String getAlbum()
AudioObject
getAlbum in interface AudioObjectpublic java.lang.String getAlbumArtist()
AudioObject
getAlbumArtist in interface AudioObjectpublic java.lang.String getArtist()
AudioObject
getArtist in interface AudioObjectpublic long getBitrate()
AudioObject
getBitrate in interface AudioObjectpublic java.lang.String getComposer()
AudioObject
getComposer in interface AudioObjectpublic long getDuration()
AudioObject
getDuration in interface AudioObjectpublic java.util.List<java.io.File> getExternalPictures()
public int getExternalPicturesCount()
public int getFrequency()
AudioObject
getFrequency in interface AudioObjectpublic java.lang.String getGenre()
AudioObject
getGenre in interface AudioObjectpublic java.lang.String getLyrics()
AudioObject
getLyrics in interface AudioObjectpublic java.lang.String getNameWithoutExtension()
public int getStars()
getStars in interface AudioObjectpublic Tag getTag()
public java.lang.String getTitle()
AudioObject
getTitle in interface AudioObjectpublic java.lang.String getTitleOrFileName()
AudioObject
getTitleOrFileName in interface AudioObjectpublic java.lang.Integer getTrackNumber()
AudioObject
getTrackNumber in interface AudioObjectpublic java.lang.String getUrl()
AudioObject
getUrl in interface AudioObjectpublic java.lang.String getYear()
AudioObject
getYear in interface AudioObjectpublic int hashCode()
hashCode in class java.io.Filepublic final boolean hasInternalPicture()
public boolean isUpToDate()
public void refreshTag()
public void setExternalPictures(java.util.List<java.io.File> externalPictures)
externalPictures - the new external picturespublic void setStars(int stars)
setStars in interface AudioObjectstars - the stars to setpublic void setTag(Tag tag)
tag - the new tagpublic void setWritable()
public java.lang.String toString()
toString in class java.io.Filepublic boolean isSeekable()
AudioObject
isSeekable in interface AudioObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||