com.dusbabek.lib.id3
Class Mp3File

java.lang.Object
  extended by com.dusbabek.lib.id3.Mp3File

public class Mp3File
extends java.lang.Object

The highest level of dealing with id3s. At this level, you don't have to know about ID3 versions, frames or anything like that. You just open up a file, request its tag, make changes and write to a different file.


Constructor Summary
Mp3File(java.io.File file)
          constructor.
 
Method Summary
 Tag getTag()
          get the tag for this file.
 void setTag(Tag tag)
          set the tag for this file.
 void write(java.io.File f)
          rewrite to a different file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mp3File

public Mp3File(java.io.File file)
        throws java.io.FileNotFoundException,
               java.io.IOException
constructor. attempts to read a tag. If none is present, a default ID3v2.3 tag is created with no frames.

Parameters:
file - File
Throws:
java.io.FileNotFoundException
java.io.IOException
Method Detail

setTag

public void setTag(Tag tag)
set the tag for this file.

Parameters:
tag - Tag

getTag

public Tag getTag()
get the tag for this file. Rather than create a bunch of wrapper methods for the set/get methods in Tag, I provoide this one. It makes things cleaner. Thus, if you REALLY wanto to deal with frames, you feasibly could.

Returns:
Tag

write

public void write(java.io.File f)
           throws java.io.IOException
rewrite to a different file.

Parameters:
f - File
Throws:
java.io.IOException


Copyright © 2004, 2005 Gary Dusbabek. All Rights Reserved.