org.jaudiotagger.audio.asf
Class AsfFileWriter
java.lang.Object
org.jaudiotagger.audio.generic.AudioFileWriter
org.jaudiotagger.audio.asf.AsfFileWriter
public class AsfFileWriter
- extends AudioFileWriter
This class writes given tags to ASF files containing WMA content.
- Author:
- Christian Laireiter
Method Summary |
protected void |
deleteTag(java.io.RandomAccessFile raf,
java.io.RandomAccessFile tempRaf)
Same as above, but delete tag in the file. |
private boolean[] |
searchExistence(ChunkContainer container,
MetadataContainer[] metaContainers)
|
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 |
AsfFileWriter
public AsfFileWriter()
deleteTag
protected void deleteTag(java.io.RandomAccessFile raf,
java.io.RandomAccessFile tempRaf)
throws CannotWriteException,
java.io.IOException
- 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)
searchExistence
private boolean[] searchExistence(ChunkContainer container,
MetadataContainer[] metaContainers)
writeTag
protected void writeTag(Tag tag,
java.io.RandomAccessFile raf,
java.io.RandomAccessFile rafTemp)
throws CannotWriteException,
java.io.IOException
- 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)