org.metasyntactic.id3.v2.frame
Class APIC
java.lang.Object
|
+--org.metasyntactic.id3.v2.frame.Frame
|
+--org.metasyntactic.id3.v2.frame.APIC
- All Implemented Interfaces:
- Id3v2Constants
- public class APIC
- extends Frame
- implements Id3v2Constants
Attached picture
This frame contains a picture directly related to the audio file.
Image format is the MIME type and subtype [MIME] for the image. In
the event that the MIME media type name is omitted, "image/" will be
implied. The "image/png" [PNG] or "image/jpeg" [JFIF] picture format
should be used when interoperability is wanted. Description is a
short description of the picture, represented as a terminated
text string. There may be several pictures attached to one file, each
in their individual "APIC" frame, but only one with the same content
descriptor. There may only be one picture with the picture type
declared as picture type $01 and $02 respectively. There is the
possibility to put only a link to the image file by using the 'MIME
type' "-->" and having a complete URL [URL] instead of picture data.
The use of linked files should however be used sparingly since there
is the risk of separation of files.
Text encoding $xx
MIME type $00
Picture type $xx
Description $00 (00)
Picture data
Picture type: $00 Other
$01 32x32 pixels 'file icon' (PNG only)
$02 Other file icon
$03 Cover (front)
$04 Cover (back)
$05 Leaflet page
$06 Media (e.g. label side of CD)
$07 Lead artist/lead performer/soloist
$08 Artist/performer
$09 Conductor
$0A Band/Orchestra
$0B Composer
$0C Lyricist/text writer
$0D Recording Location
$0E During recording
$0F During performance
$10 Movie/video screen capture
$11 A bright coloured fish
$12 Illustration
$13 Band/artist logotype
$14 Publisher/Studio logotype
| Fields inherited from interface org.metasyntactic.id3.v2.Id3v2Constants |
ISO_8859_1, JAVA_ISO_8859_1, JAVA_US_ASCII, JAVA_UTF_16, JAVA_UTF_16_BIG_ENDIAN, JAVA_UTF_8, MAJOR_VERSION, MAX_ENCODING, MIN_ENCODING, REVISION_NUMBER, UTF_16, UTF_16_BIG_ENDIAN, UTF_8 |
|
Constructor Summary |
protected |
APIC()
|
|
APIC(byte textEncoding,
java.lang.String mimeType,
byte pictureType,
java.lang.String description,
byte[] pictureData)
Language must be a 3 character string from
org.metasyntactic.language.codes.ISO_639_B |
|
Method Summary |
int |
getSize()
A COMM frame uses 1 byte for the encoding, 3 bytes for the language,
and then the length of the comment in encoded bytes |
void |
readContent(java.io.PushbackInputStream in,
int length)
Subclasses must implement this method so that they can restore the
contents of their fields from the stream |
java.lang.String |
toString()
|
void |
writeContent(java.io.OutputStream out)
This is called as the last step of write(OutputStream). |
| Methods inherited from class org.metasyntactic.id3.v2.frame.Frame |
getTotalSize, hasDataLengthIndicator, isCompressed, isDiscardedOnFileAlteration, isDiscardedOnTagAlteration, isEncrypted, isPartOfGroup, isReadOnly, isUnsynchronized, read, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OTHER
public static final byte OTHER
- See Also:
- Constant Field Values
FILE_ICON_32x32_PNG_ONLY
public static final byte FILE_ICON_32x32_PNG_ONLY
- See Also:
- Constant Field Values
OTHER_FILE_ICON
public static final byte OTHER_FILE_ICON
- See Also:
- Constant Field Values
COVER_FRONT
public static final byte COVER_FRONT
- See Also:
- Constant Field Values
COVER_BACK
public static final byte COVER_BACK
- See Also:
- Constant Field Values
LEAFLET_PAGE
public static final byte LEAFLET_PAGE
- See Also:
- Constant Field Values
MEDIA
public static final byte MEDIA
- See Also:
- Constant Field Values
LEAD_ARTIST
public static final byte LEAD_ARTIST
- See Also:
- Constant Field Values
PERFORMER
public static final byte PERFORMER
- See Also:
- Constant Field Values
CONDUCTOR
public static final byte CONDUCTOR
- See Also:
- Constant Field Values
BAND
public static final byte BAND
- See Also:
- Constant Field Values
COMPOSER
public static final byte COMPOSER
- See Also:
- Constant Field Values
LYRICIST
public static final byte LYRICIST
- See Also:
- Constant Field Values
RECORDING_LOCATION
public static final byte RECORDING_LOCATION
- See Also:
- Constant Field Values
DURING_RECORDING
public static final byte DURING_RECORDING
- See Also:
- Constant Field Values
DURING_PERFORMANCE
public static final byte DURING_PERFORMANCE
- See Also:
- Constant Field Values
SCREEN_CAPTURE
public static final byte SCREEN_CAPTURE
- See Also:
- Constant Field Values
BRIGHT_COLOURED_FISH
public static final byte BRIGHT_COLOURED_FISH
- See Also:
- Constant Field Values
ILLUSTRATION
public static final byte ILLUSTRATION
- See Also:
- Constant Field Values
BAND_LOGO
public static final byte BAND_LOGO
- See Also:
- Constant Field Values
STUDIO_LOGO
public static final byte STUDIO_LOGO
- See Also:
- Constant Field Values
APIC
protected APIC()
APIC
public APIC(byte textEncoding,
java.lang.String mimeType,
byte pictureType,
java.lang.String description,
byte[] pictureData)
- Language must be a 3 character string from
org.metasyntactic.language.codes.ISO_639_B
getSize
public int getSize()
- A COMM frame uses 1 byte for the encoding, 3 bytes for the language,
and then the length of the comment in encoded bytes
- Overrides:
getSize in class Frame
readContent
public void readContent(java.io.PushbackInputStream in,
int length)
throws java.io.IOException,
Id3v2Exception
- Description copied from class:
Frame
- Subclasses must implement this method so that they can restore the
contents of their fields from the stream
- Specified by:
readContent in class Frame
java.io.IOException
Id3v2Exception
writeContent
public void writeContent(java.io.OutputStream out)
throws java.io.IOException
- Description copied from class:
Frame
- This is called as the last step of write(OutputStream). Subclasses must
implement in order to properly write out their data to the stream
- Specified by:
writeContent in class Frame
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString in class Frame