com.dusbabek.lib.id3
Class Tag_v1

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

public class Tag_v1
extends java.lang.Object
implements Tag

ID3v1.x tag. 'T' 'A' 'G' 3 bytes song name 30 bytes artist 30 bytes album 30 bytes year 4 bytes comment 30 bytes genre 1 byte in v1.1, the genre is 28 bytes. byte 29 is null and byte 30 indicates track (8 bit unsigned int).


Field Summary
static int TAG_LENGTH
          length of a 1.x tag is always 128 bytes.
static int VERSION_1_0
          ID3v1.0
static int VERSION_1_1
          ID3v1.1
 
Fields inherited from interface com.dusbabek.lib.id3.Tag
V1_0, V1_1, V2_2, V2_3, V2_4
 
Constructor Summary
Tag_v1(byte[] data)
          construct a tag from data parts.
 
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 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(byte b)
          sets the genre according to the 1.x byte spec.
 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
 

Field Detail

TAG_LENGTH

public static final int TAG_LENGTH
length of a 1.x tag is always 128 bytes.

See Also:
Constant Field Values

VERSION_1_0

public static final int VERSION_1_0
ID3v1.0

See Also:
Constant Field Values

VERSION_1_1

public static final int VERSION_1_1
ID3v1.1

See Also:
Constant Field Values
Constructor Detail

Tag_v1

public Tag_v1(byte[] data)
       throws java.io.IOException
construct a tag from data parts.

Parameters:
data - byte[]
Throws:
java.io.IOException
Method Detail

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface Tag
Returns:
stringified verion.

getTitle

public java.lang.String getTitle()

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

getArtist

public java.lang.String getArtist()

Specified by:
getArtist in interface Tag
Returns:
artist name

getAlbum

public java.lang.String getAlbum()

Specified by:
getAlbum in interface Tag
Returns:
ablum name

getYear

public java.lang.String getYear()

Specified by:
getYear in interface Tag
Returns:
year

getComment

public java.lang.String getComment()

Specified by:
getComment in interface Tag
Returns:
comment

getTrack

public java.lang.String getTrack()

Specified by:
getTrack in interface Tag
Returns:
track number

getGenre

public java.lang.String getGenre()

Specified by:
getGenre in interface Tag
Returns:
genre

setTitle

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

Specified by:
setTitle in interface Tag

setArtist

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

Specified by:
setArtist in interface Tag

setAlbum

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

Specified by:
setAlbum in interface Tag

setYear

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

Specified by:
setYear in interface Tag

setComment

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

Specified by:
setComment in interface Tag

setTrack

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

Specified by:
setTrack in interface Tag

setGenre

public void setGenre(byte b)
sets the genre according to the 1.x byte spec.

Parameters:
b - byte

setGenre

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

Specified by:
setGenre 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


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