|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
entagged.audioformats
Class AudioFile
java.lang.Objectjava.io.File
entagged.audioformats.AudioFile
- All Implemented Interfaces:
- Serializable, Comparable<File>
This is the main object manipulated by the user representing an audiofile, its properties and its tag.
The prefered way to obtain an AudioFile is to use the AudioFileIO.read(File) method.
The AudioFile contains every properties associated with the file itself (no meta-data), like the bitrate, the sampling rate, the encoding infos, etc.
To get the meta-data contained in this file you have to get the Tag of this AudioFile
- Since:
- v0.01
- Version:
- $Id: AudioFile.java 287 2009-04-26 23:28:35Z shred $
- See Also:
AudioFileIO,Tag, Serialized Form
| Field Summary |
|---|
| Fields inherited from class java.io.File |
|---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
| Constructor Summary | |
|---|---|
AudioFile(File f,
EncodingInfo info)
These constructors are used by the different readers, users should not use them, but use the AudioFileIO.read(File) method instead !. |
|
AudioFile(File f,
EncodingInfo info,
Tag tag)
These constructors are used by the different readers, users should not use them, but use the AudioFileIO.read(File) method instead !. |
|
AudioFile(String s,
EncodingInfo info)
These constructors are used by the different readers, users should not use them, but use the AudioFileIO.read(File) method instead !. |
|
AudioFile(String s,
EncodingInfo info,
Tag tag)
These constructors are used by the different readers, users should not use them, but use the AudioFileIO.read(File) method instead !. |
|
| Method Summary | |
|---|---|
int |
getBitrate()
Returns the bitrate of this AufioFile in kilobytes per second (KB/s). |
int |
getChannelNumber()
Returns the number of audio channels contained in this AudioFile, 2 for example means stereo |
String |
getEncodingType()
Returns the encoding type of this AudioFile, this needs to be precisely specified in the future |
String |
getExtraEncodingInfos()
Returns the extra encoding infos of this AudioFile, this needs to be precisely specified in the future |
int |
getLength()
Returns the length (duration) in seconds (s) of this AudioFile.Example: 241 seconds |
int |
getSamplingRate()
Returns the sampling rate of this AudioFile in Hertz (Hz). |
Tag |
getTag()
Returns the tag contained in this AudioFile, the Tag contains any useful meta-data, like artist, album, title, etc. |
boolean |
isVbr()
|
String |
toString()
Returns a multi-line string with the file path, the encoding informations, and the tag contents. |
| Methods inherited from class java.io.File |
|---|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, 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 |
| Constructor Detail |
|---|
AudioFile
public AudioFile(String s, EncodingInfo info, Tag tag)
These constructors are used by the different readers, users should not use them, but use the
AudioFileIO.read(File)method instead !.Create the AudioFile representing file denoted by pathname s, the encodinginfos and containing the tag
- Parameters:
s- The pathname of the audiofileinfo- the encoding infos over this filetag- the tag contained in this file
AudioFile
public AudioFile(String s, EncodingInfo info)
These constructors are used by the different readers, users should not use them, but use the
AudioFileIO.read(File)method instead !.Create the AudioFile representing file denoted by pathname s, the encodinginfos and containing an empty tag
- Parameters:
s- The pathname of the audiofileinfo- the encoding infos over this file
AudioFile
public AudioFile(File f, EncodingInfo info, Tag tag)
These constructors are used by the different readers, users should not use them, but use the
AudioFileIO.read(File)method instead !.Create the AudioFile representing file f, the encodinginfos and containing the tag
- Parameters:
f- The file of the audiofileinfo- the encoding infos over this filetag- the tag contained in this file
AudioFile
public AudioFile(File f, EncodingInfo info)
These constructors are used by the different readers, users should not use them, but use the
AudioFileIO.read(File)method instead !.Create the AudioFile representing file f, the encodinginfos and containing an empty tag
- Parameters:
f- The file of the audiofileinfo- the encoding infos over this file
| Method Detail |
|---|
getBitrate
public int getBitrate()
Returns the bitrate of this AufioFile in kilobytes per second (KB/s). Example: 192 KB/s
- Returns:
- Returns the bitrate of this AufioFile
getChannelNumber
public int getChannelNumber()
Returns the number of audio channels contained in this AudioFile, 2 for example means stereo
- Returns:
- Returns the number of audio channels contained in this AudioFile
getEncodingType
public String getEncodingType()
Returns the encoding type of this AudioFile, this needs to be precisely specified in the future
- Returns:
- Returns the encoding type of this AudioFile
getExtraEncodingInfos
public String getExtraEncodingInfos()
Returns the extra encoding infos of this AudioFile, this needs to be precisely specified in the future
- Returns:
- Returns the extra encoding infos of this AudioFile
getSamplingRate
public int getSamplingRate()
Returns the sampling rate of this AudioFile in Hertz (Hz). Example: 44100 Hz for most of the audio files
- Returns:
- Returns the sampling rate of this AudioFile
getLength
public int getLength()
Returns the length (duration) in seconds (s) of this AudioFile.Example: 241 seconds
- Returns:
- Returns the length (duration) of this AudioFile
getTag
public Tag getTag()
Returns the tag contained in this AudioFile, the
Tagcontains any useful meta-data, like artist, album, title, etc.If the file does not contain any tag, a new empty tag is returned
- Returns:
- Returns the tag contained in this AudioFile, or a new one if file hasn't any tag.
isVbr
public boolean isVbr()
toString
public String toString()
Returns a multi-line string with the file path, the encoding informations, and the tag contents.
- Returns:
- A multi-line string with the file path, the encoding informations, and the tag contents.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2007-2011 shredzone.org. All Rights Reserved.
