|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaudiotagger.audio.AudioFile
public class AudioFile
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 audioHeaders, etc.
To get the meta-data contained in this file you have to get the Tag
of this AudioFile
AudioFileIO
,
Tag
Field Summary | |
---|---|
static java.util.logging.Logger |
logger
|
Constructor Summary | |
---|---|
AudioFile()
|
|
AudioFile(java.io.File f,
AudioHeader audioHeader,
Tag tag)
These constructors are used by the different readers, users should not use them, but use the AudioFileIO.read(File) method instead !. |
|
AudioFile(java.lang.String s,
AudioHeader audioHeader,
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 | |
---|---|
void |
commit()
Write the tag contained in this AudioFile in the actual file on the disk, this is the same as calling the AudioFileIO.write(this) method. |
java.lang.String |
displayStructureAsPlainText()
Optional debugging method |
java.lang.String |
displayStructureAsXML()
Optional debugging method |
AudioHeader |
getAudioHeader()
Return audio header |
java.io.File |
getFile()
Retrieve the physical file |
Tag |
getTag()
Returns the tag contained in this AudioFile, the Tag contains any useful meta-data, like
artist, album, title, etc. |
void |
setFile(java.io.File file)
Set the file to store the info in |
void |
setTag(Tag tag)
|
java.lang.String |
toString()
Returns a multi-line string with the file path, the encoding audioHeaderrmations, and the tag contents. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.util.logging.Logger logger
Constructor Detail |
---|
public AudioFile()
public AudioFile(java.io.File f, AudioHeader audioHeader, 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 encodingaudioHeaders and containing the tag
f
- The file of the audiofileaudioHeader
- the encoding audioHeaders over this filetag
- the tag contained in this file or null if no tag existspublic AudioFile(java.lang.String s, AudioHeader audioHeader, 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 encodingaudioHeaders and containing the tag
s
- The pathname of the audiofileaudioHeader
- the encoding audioHeaders over this filetag
- the tag contained in this fileMethod Detail |
---|
public void commit() throws CannotWriteException
Write the tag contained in this AudioFile in the actual file on the disk, this is the same as calling the AudioFileIO.write(this)
method.
CannotWriteException
- If the file could not be written/accessed, the extension wasn't recognized, or other IO error occured.AudioFileIO
public void setFile(java.io.File file)
file
- public java.io.File getFile()
public void setTag(Tag tag)
public AudioHeader getAudioHeader()
public Tag getTag()
Returns the tag contained in this AudioFile, the Tag
contains any useful meta-data, like
artist, album, title, etc. If the file does not contain any tag the null is returned. Some audio formats do
not allow there to be no tag so in this case the reader would return an empty tag whereas for others such
as mp3 it is purely optional.
public java.lang.String toString()
Returns a multi-line string with the file path, the encoding audioHeaderrmations, and the tag contents.
toString
in class java.lang.Object
public java.lang.String displayStructureAsXML()
public java.lang.String displayStructureAsPlainText()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |