Overview | File | Class | Tree | Index | Help
| Jala 1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class jala.Mp3.Id3v2

    Object
       |
       +--jala.Mp3.Id3v2

class jala.Mp3.Id3v2

This class represents an Id3v2 tag.
Defined in Mp3.js

Constructor Summary
`jala.Mp3.Id3v2 (audioObj)` Constructs a new Id3v2 tag from an Mp3 file

Method Summary
`void` | `copyFrom(tag)` Copies standard fields from another tag.
`String` | `getAlbum()` Returns the album information of the tag.
`String` | `getArtist()` Returns the artist information of the tag.
`jala.Mp3` | `getAudio()` Returns the wrapper for the underlying audio file.
`String` | `getAuthor()` Returns the author information of the tag.
`String` | `getComment()` Returns the comment information of the tag.
`String` | `getCopyright()` Returns the copyright information of the tag.
`String` | `getGenre()` Returns the genre information of the tag.
`helma.util.MimePart` | `getImage(<String> pictureType)` Extracts the image from the tag
`org.farng.mp3.id3.AbstractID3v2` | `getJavaObject()` returns the java representation of the tag, class depends on the actual library used.
`Number` | `getSubtype()` Returns the version number of this id3v2 (values 2 to 4 for id3v2.2 to id3v2.4)
`String` | `getTextContent(idStr)` This method can be used to retrieve an arbitrary text frame of the underlying tag.
`Number` | `getTextEncoding()` Returns the text encoding used when setting values.
`String` | `getTitle()` Returns the title information of the tag.
`String` | `getTrackNumber()` Returns the track number information of the tag.
`String` | `getUrl()` Returns the Url stored in this tag
`String` | `getYear()` Returns the year information of the tag.
`void` | `removeFromAudio()` Removes the tag from the audio file and nulls out the wrapper.
`void` | `setAlbum(<String> album)` Sets the album information.
`void` | `setArtist(<String> artist)` Sets the artist information.
`void` | `setAuthor(<String> author)` Sets the author information in this tag
`void` | `setComment(<String> comment)` Sets the comment
`void` | `setCopyright(<String> copyright)` Sets the copyright information in this tag
`void` | `setGenre(<String> genre)` Sets the genre information.
`void` | `setImage(<Number> pictureType, <String> mimeType, <Array> byteArray)` adds an image to the file.
`String` | `setTextContent(idStr, val)` This method can be used to set an arbitrary field of the underlying tag.
`void` | `setTextEncoding(<Number|String> encType)` sets the text encoding used when creating new frames (the encoding type of old frames can't be changed with JavaMusicTag)
`void` | `setTitle(<String> title)` Sets the title information
`void` | `setTrackNumber(<Number> trackNumber)` Sets the track number information.
`void` | `setUrl(<String> url, <String> desc)` Stores the Url passed as argument in this tag.
`void` | `setYear(<Number> year)` Sets the year information.

Constructor Detail

### jala.Mp3.Id3v2

    jala.Mp3.Id3v2(audioObj)

Constructs a new Id3v2 tag from an Mp3 file

Parameters:

`mp3File` -

Method Detail

### copyFrom

    void copyFrom(tag)

Copies standard fields from another tag.

Parameters:

`src` - object with getter methods for fields album, artist, comment, title, trackNumber, genre and year.

### getAlbum

    String getAlbum()

Returns the album information of the tag.

Returns:

string containing album name

### getArtist

    String getArtist()

Returns the artist information of the tag.

Returns:

string containing artist name

### getAudio

    jala.Mp3 getAudio()

Returns the wrapper for the underlying audio file.

### getAuthor

    String getAuthor()

Returns the author information of the tag.

Returns:

string containing author information

### getComment

    String getComment()

Returns the comment information of the tag.

Returns:

string containing comment

### getCopyright

    String getCopyright()

Returns the copyright information of the tag.

Returns:

The copyright information of the tag

### getGenre

    String getGenre()

Returns the genre information of the tag.

Returns:

string containing genre name

### getImage

    helma.util.MimePart getImage(<String> pictureType)

Extracts the image from the tag

Parameters:

`pictureType` - number describing picture type (default is 3, describing a front cover).

Returns:

image as mime object

### getJavaObject

    org.farng.mp3.id3.AbstractID3v2 getJavaObject()

returns the java representation of the tag, class depends on the actual library used.

### getSubtype

    Number getSubtype()

Returns the version number of this id3v2 (values 2 to 4 for id3v2.2 to id3v2.4)

Returns:

The version number of this Id3v2 tag

### getTextContent

    String getTextContent(idStr)

This method can be used to retrieve an arbitrary text frame of the underlying tag. For the list of valid identifiers and their meaning see http://www.id3.org/ The identifiers vary across the sub versions of id3v2 tags, use getSubtype to make sure you use the correct version.

Parameters:

`id` - Frame identifier according to Id3v2 specification or shortcut as defined in jala.Mp3.FIELD_MAPPING.

Returns:

String contained in the frame

See:

- getSubtype()

### getTextEncoding

    Number getTextEncoding()

Returns the text encoding used when setting values.

Returns:

The text encoding

### getTitle

    String getTitle()

Returns the title information of the tag.

Returns:

string containing title

### getTrackNumber

    String getTrackNumber()

Returns the track number information of the tag.

Returns:

string representing track number

### getUrl

    String getUrl()

Returns the Url stored in this tag

Returns:

The url stored in this tag

### getYear

    String getYear()

Returns the year information of the tag.

Returns:

string representing year

### removeFromAudio

    void removeFromAudio()

Removes the tag from the audio file and nulls out the wrapper.

### setAlbum

    void setAlbum(<String> album)

Sets the album information.

Parameters:

`album` -

### setArtist

    void setArtist(<String> artist)

Sets the artist information.

Parameters:

`artist` -

### setAuthor

    void setAuthor(<String> author)

Sets the author information in this tag

Parameters:

`author` - The author information to set

### setComment

    void setComment(<String> comment)

Sets the comment

Parameters:

`comment` -

### setCopyright

    void setCopyright(<String> copyright)

Sets the copyright information in this tag

Parameters:

`copyright` - The copyright information to set

### setGenre

    void setGenre(<String> genre)

Sets the genre information. A list of genre names that are compatible with ID3v1 tags is located in jala.Mp3.GENRES.

Parameters:

`genre` -

### setImage

    void setImage(<Number> pictureType, <String> mimeType, <Array> byteArray)

adds an image to the file.

Parameters:

`pictureType` - number determining picture type

`mimeType` - mime type of image

`byteArray` - image binary data

`desc` - optional description

See:

- jala.Mp3

### setTextContent

    String setTextContent(idStr, val)

This method can be used to set an arbitrary field of the underlying tag. For the list of valid identifiers and their meaning see http://www.id3.org/ The identifiers vary across the sub versions of id3v2 tags, use getSubtype to make sure you use the correct version.

Parameters:

`id` - Frame identifier according to Id3v2 specification

`value` -

See:

- getSubtype()

### setTextEncoding

    void setTextEncoding(<Number|String> encType)

sets the text encoding used when creating new frames (the encoding type of old frames can't be changed with JavaMusicTag)

Parameters:

`encType` - the new encoding type as number or string

See:

- jala.Mp3.TEXT_ENCODINGS

### setTitle

    void setTitle(<String> title)

Sets the title information

Parameters:

`title` -

### setTrackNumber

    void setTrackNumber(<Number> trackNumber)

Sets the track number information.

Parameters:

`trackNumber` -

### setUrl

    void setUrl(<String> url, <String> desc)

Stores the Url passed as argument in this tag.

Parameters:

`url` - The url to store in this tag

`desc` - An optiona description of the Url

### setYear

    void setYear(<Number> year)

Sets the year information.

Parameters:

`year` -

Overview | File | Class | Tree | Index | Help
| Jala 1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Tue May 29 10:26:15 2007