org.jaudiotagger.audio.flac
Class FlacFileWriter
java.lang.Object
org.jaudiotagger.audio.generic.AudioFileWriter
org.jaudiotagger.audio.flac.FlacFileWriter
public class FlacFileWriter
- extends AudioFileWriter
Write/delete tag info for Flac file (opensource lossless encoding)
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 |
tw
private FlacTagWriter tw
FlacFileWriter
public FlacFileWriter()
writeTag
protected void writeTag(Tag tag,
java.io.RandomAccessFile raf,
java.io.RandomAccessFile rafTemp)
throws 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:
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 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:
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)