magoffin.matt.meta.audio
Class ID3v2_2MetadataResource
java.lang.Object
magoffin.matt.meta.support.AbstractMetadataResource
magoffin.matt.meta.support.AbstractEnumMetadataResource<AudioMetadataType>
magoffin.matt.meta.audio.ID3v2_2MetadataResource
- All Implemented Interfaces:
- AudioMetadataResource, MetadataResource
- Direct Known Subclasses:
- ID3v2_3MetadataResource
public class ID3v2_2MetadataResource
- extends AbstractEnumMetadataResource<AudioMetadataType>
- implements AudioMetadataResource
MetadataResource
implementation for ID3v2 resources.
- Version:
- $Revision: 3 $ $Date: 2008-12-27 08:09:28 +1300 (Sat, 27 Dec 2008) $
- Author:
- Matt Magoffin (spamsqr@msqr.us)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ID3v2_2MetadataResource
public ID3v2_2MetadataResource(java.io.RandomAccessFile file)
throws java.io.IOException
- Construct with a RandomAccessFile.
- Parameters:
file
- the file
- Throws:
java.io.IOException
- if an error occurs
parseMetadata
protected void parseMetadata(MP3AudioMetadata mp3,
MP3Tag id3)
- Parse the metadata from the MP3 audio and MP3 tags.
- Parameters:
mp3
- the MP3 audio metadataid3
- the MP3 tag metadata
handleAlbumCover
protected void handleAlbumCover(MP3Tag id3)
- Extract a
MetadataImage
for the AudioMetadataType.ALBUM_COVER
.
This implementation looks for a MP3MetadataItem
with
the ID PIC
and extracts the picture data from there.
- Parameters:
id3
- the ID3 tag data to extract from
getMP3Tag
protected MP3Tag getMP3Tag(java.io.RandomAccessFile mp3File)
throws java.io.IOException
- Get a
MP3Tag
implementation for a file.
- Parameters:
mp3File
- the file
- Returns:
- the MP3Tag implementation
- Throws:
java.io.IOException
- if an IO error occurs
getMpegAudioMetadata
protected MP3AudioMetadata getMpegAudioMetadata(java.io.RandomAccessFile mp3File)
throws java.io.IOException
- Get a
MP3AudioMetadata
for a file.
- Parameters:
mp3File
- the file
- Returns:
- the audio metadata
- Throws:
java.io.IOException
- if an IO error occurs
getFile
protected java.io.RandomAccessFile getFile()
- Returns:
- the file