magoffin.matt.meta.audio
Class ID3v2_3MetadataResource

java.lang.Object
  extended by magoffin.matt.meta.support.AbstractMetadataResource
      extended by magoffin.matt.meta.support.AbstractEnumMetadataResource<AudioMetadataType>
          extended by magoffin.matt.meta.audio.ID3v2_2MetadataResource
              extended by magoffin.matt.meta.audio.ID3v2_3MetadataResource
All Implemented Interfaces:
AudioMetadataResource, MetadataResource
Direct Known Subclasses:
ID3v2_4MetadataResource

public class ID3v2_3MetadataResource
extends ID3v2_2MetadataResource

MetadataResource implementation for ID3v2.3 resources.

Version:
$Revision: 3 $ $Date: 2008-12-27 08:09:28 +1300 (Sat, 27 Dec 2008) $
Author:
Matt Magoffin (spamsqr@msqr.us)

Field Summary
 
Fields inherited from class magoffin.matt.meta.support.AbstractMetadataResource
log
 
Constructor Summary
ID3v2_3MetadataResource(java.io.RandomAccessFile file)
          Construct with a RandomAccessFile.
 
Method Summary
protected  MP3Tag getMP3Tag(java.io.RandomAccessFile file)
          Get a MP3Tag implementation for a file.
protected  void handleAlbumCover(MP3Tag id3)
          Extract a MetadataImage for the AudioMetadataType.ALBUM_COVER.
 
Methods inherited from class magoffin.matt.meta.audio.ID3v2_2MetadataResource
getFile, getMpegAudioMetadata, parseMetadata
 
Methods inherited from class magoffin.matt.meta.support.AbstractEnumMetadataResource
addError, addValue, getValue, getValues, setValue, setValues
 
Methods inherited from class magoffin.matt.meta.support.AbstractMetadataResource
addError, addValue, clearValues, getParsedKeys, getParseErrors, getValue, getValueList, getValues, setValue, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface magoffin.matt.meta.audio.AudioMetadataResource
getValue, getValues
 
Methods inherited from interface magoffin.matt.meta.MetadataResource
getParsedKeys, getParseErrors, getValue, getValues
 

Constructor Detail

ID3v2_3MetadataResource

public ID3v2_3MetadataResource(java.io.RandomAccessFile file)
                        throws java.io.IOException
Construct with a RandomAccessFile.

Parameters:
file - the file
Throws:
java.io.IOException - if an error occurs
Method Detail

getMP3Tag

protected MP3Tag getMP3Tag(java.io.RandomAccessFile file)
                    throws java.io.IOException
Get a MP3Tag implementation for a file.

Overrides:
getMP3Tag in class ID3v2_2MetadataResource
Parameters:
file - the file
Returns:
the MP3Tag implementation
Throws:
java.io.IOException - if an IO error occurs

handleAlbumCover

protected void handleAlbumCover(MP3Tag id3)
Extract a MetadataImage for the AudioMetadataType.ALBUM_COVER.

This implementation looks for a MP3MetadataItem with the ID APIC and extracts the picture data from there.

Overrides:
handleAlbumCover in class ID3v2_2MetadataResource
Parameters:
id3 - the ID3 tag data to extract from