org.qtunes.ff
Class TrackWriter

java.lang.Object
  extended by org.qtunes.ff.TrackReader
      extended by org.qtunes.ff.TrackWriter
All Implemented Interfaces:
Service
Direct Known Subclasses:
MP3Handler

public abstract class TrackWriter
extends TrackReader

An interface which can be implemented by a TrackReader if it can update a File with new fields


Field Summary
 
Fields inherited from class org.qtunes.ff.TrackReader
MP3GENRES
 
Constructor Summary
TrackWriter()
           
 
Method Summary
abstract  boolean write(java.io.File file, FieldMap changes)
          Update a file directly - can be used by utility classes (eg tagger package) to update files without a database.
abstract  void write(Track track, FieldMap changes)
          Update the track
 
Methods inherited from class org.qtunes.ff.TrackReader
getAudioInputStream, getTrackReader, getTrackReader, getTrackReader, getTrackReader, getType, matches, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.qtunes.core.Service
getContext, reportState, startService, stopService
 

Constructor Detail

TrackWriter

public TrackWriter()
Method Detail

write

public abstract void write(Track track,
                           FieldMap changes)
                    throws java.io.IOException
Update the track

Parameters:
track - the Track with the existing fields
changes - the Changes to those fields - a value of null in this Map means the field is deleted, and a key of Field.LastModified means the File modification time will not be updated.
Throws:
java.io.IOException

write

public abstract boolean write(java.io.File file,
                              FieldMap changes)
                       throws java.io.IOException
Update a file directly - can be used by utility classes (eg tagger package) to update files without a database.

Parameters:
file - the audio File to update
changes - the Changes to those fields - a value of null in this Map means the field is deleted, and a key of Field.LastModified means the File modification time will not be updated.
Throws:
java.io.IOException