com.dusbabek.lib.id3
Class Tag_v2

java.lang.Object
  extended by com.dusbabek.lib.id3.Tag_v2
All Implemented Interfaces:
Tag

public class Tag_v2
extends java.lang.Object
implements Tag

Represents a ID3v2.x tag. I'm not going to bother with bits and bytes here, but here is the rough format.

... You should get the idea if you've made it this far.


Field Summary
 
Fields inherited from interface com.dusbabek.lib.id3.Tag
V1_0, V1_1, V2_2, V2_3, V2_4
 
Constructor Summary
Tag_v2()
          creates a blank tag.
Tag_v2(TagHeader header)
          creates a stub of a tag (header but no frames).
 
Method Summary
 java.lang.String getAlbum()
          
 java.lang.String getArtist()
          
 java.lang.String getComment()
          
 java.lang.String getGenre()
          
 java.lang.String getTitle()
          
 java.lang.String getTrack()
          
 java.lang.String getVersion()
          
 java.lang.String getYear()
          
 void putFrame(Frame fr)
          add or replace a frame.
 void setAlbum(java.lang.String s)
          set album name
 void setArtist(java.lang.String s)
          set artist name
 void setComment(java.lang.String s)
          set comment
 void setGenre(java.lang.String s)
          set genre
 void setTitle(java.lang.String s)
          set title (song name)
 void setTrack(java.lang.String s)
          set track
 void setYear(java.lang.String s)
          set year
 void write(java.io.OutputStream out)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tag_v2

public Tag_v2()
       throws java.io.IOException
creates a blank tag. Useful for writing to files with no current tag

Throws:
java.io.IOException

Tag_v2

public Tag_v2(TagHeader header)
creates a stub of a tag (header but no frames).

Parameters:
header - TagHeader
Method Detail

putFrame

public void putFrame(Frame fr)
add or replace a frame.

Parameters:
fr - Frame
To do:
option to add or replace to handle multiple occurances of a frame.

getAlbum

public java.lang.String getAlbum()

Specified by:
getAlbum in interface Tag
Returns:
ablum name

getArtist

public java.lang.String getArtist()

Specified by:
getArtist in interface Tag
Returns:
artist name

getComment

public java.lang.String getComment()

Specified by:
getComment in interface Tag
Returns:
comment

getGenre

public java.lang.String getGenre()

Specified by:
getGenre in interface Tag
Returns:
genre

getTitle

public java.lang.String getTitle()

Specified by:
getTitle in interface Tag
Returns:
title (song name)

getTrack

public java.lang.String getTrack()

Specified by:
getTrack in interface Tag
Returns:
track number

getYear

public java.lang.String getYear()

Specified by:
getYear in interface Tag
Returns:
year

setAlbum

public void setAlbum(java.lang.String s)
set album name

Specified by:
setAlbum in interface Tag

setArtist

public void setArtist(java.lang.String s)
set artist name

Specified by:
setArtist in interface Tag

setComment

public void setComment(java.lang.String s)
set comment

Specified by:
setComment in interface Tag

setGenre

public void setGenre(java.lang.String s)
set genre

Specified by:
setGenre in interface Tag

setTitle

public void setTitle(java.lang.String s)
set title (song name)

Specified by:
setTitle in interface Tag

setTrack

public void setTrack(java.lang.String s)
set track

Specified by:
setTrack in interface Tag

setYear

public void setYear(java.lang.String s)
set year

Specified by:
setYear in interface Tag

write

public void write(java.io.OutputStream out)
           throws java.io.IOException

Specified by:
write in interface Tag
Throws:
java.io.IOException

getVersion

public java.lang.String getVersion()

Specified by:
getVersion in interface Tag
Returns:
the stringified version: "1.1", "2.3", etc.


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