org.jaudiotagger.audio.ogg
Class OggFileWriter
java.lang.Object
org.jaudiotagger.audio.generic.AudioFileWriter
org.jaudiotagger.audio.ogg.OggFileWriter
public class OggFileWriter
- extends AudioFileWriter
Write tag data to Ogg File
Only works for Ogg files containing a vorbis stream
Method Summary |
protected void |
deleteTag(java.io.RandomAccessFile raf,
java.io.RandomAccessFile tempRaf)
Same as above, but delete tag in the file. |
protected void |
writeTag(Tag tag,
java.io.RandomAccessFile raf,
java.io.RandomAccessFile rafTemp)
This is called when a tag has to be written in a file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public static java.util.logging.Logger logger
vtw
private OggVorbisTagWriter vtw
OggFileWriter
public OggFileWriter()
writeTag
protected void writeTag(Tag tag,
java.io.RandomAccessFile raf,
java.io.RandomAccessFile rafTemp)
throws CannotReadException,
CannotWriteException,
java.io.IOException
- Description copied from class:
AudioFileWriter
- This is called when a tag has to be written in a file. Three parameters
are provided, the tag to write (not empty) Two randomaccessfiles, the
first points to the file where we want to write the given tag, and the
second is an empty temporary file that can be used if e.g. the file has
to be bigger than the original.
If something has been written in the temporary file, when this method
returns, the original file is deleted, and the temporary file is renamed
the the original name
If nothing has been written to it, it is simply deleted.
This method can assume the raf, rafTemp are pointing to the first byte of
the file. The subclass must not close these two files when the method
returns.
- Specified by:
writeTag
in class AudioFileWriter
- Throws:
CannotReadException
CannotWriteException
- when an error occured during the generation of the tag
java.io.IOException
- is thrown when the RandomAccessFile operations throw it (you
should never throw them manually)
deleteTag
protected void deleteTag(java.io.RandomAccessFile raf,
java.io.RandomAccessFile tempRaf)
throws CannotReadException,
CannotWriteException,
java.io.IOException
- Description copied from class:
AudioFileWriter
- Same as above, but delete tag in the file.
- Specified by:
deleteTag
in class AudioFileWriter
- Throws:
CannotReadException
CannotWriteException
- when an error occured during the deletion of the tag
java.io.IOException
- is thrown when the RandomAccessFile operations throw it (you
should never throw them manually)