|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tffenterprises.music.tag.id3v2.Frame
com.tffenterprises.music.tag.id3v2.frame.BaseFrame
com.tffenterprises.music.tag.id3v2.frame.TextBasedFrame
com.tffenterprises.music.tag.id3v2.frame.APICFrame
public class APICFrame
This class is the ID3v2 APIC frame type; it handles image data.
Field Summary | |
---|---|
private byte[] |
imageData
The image data. |
private java.lang.String |
imageDescription
The description text for this frame. |
private java.lang.String |
imageMimeType
The image type (MIME) for this frame. |
private byte |
imageType
The image type |
private static java.lang.String |
MY_ID
The frame ID of this frame. |
Fields inherited from class com.tffenterprises.music.tag.id3v2.frame.TextBasedFrame |
---|
BOM_CHAR, BOM_CHAR_STRING, ENCODING_STRINGS, ISO_8859_1, NULL_BOM_STRING, NULL_CHAR, NULL_CHAR_STRING, UNICODE, UNICODE_BIG, UNICODE_LITTLE, UTF8 |
Constructor Summary | |
---|---|
APICFrame()
Constructs a new APICFrame with no description or value. |
|
APICFrame(FrameHeader header)
Constructs a APICFrame using the given header. |
|
APICFrame(FrameHeader header,
java.lang.String description,
byte[] image)
Constructs a new APICFrame with the specified header, description and value. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a clone of this ID3v2 frame. |
boolean |
equals(java.lang.Object other)
Compares this ID3v2 frame with another object. |
java.lang.String |
getDescription()
Returns the description field for the image embedded in this frame. |
byte[] |
getImageData()
Returns the image data for this frame. |
byte[] |
getRawData()
Returns the raw data corresponding to this frame. |
boolean |
isOfRepeatableType()
Returns true, since it is legal for multiple frames of this type to exist in the same ID3v2 tag. |
void |
setDescription(java.lang.String frameDescription)
Sets the description field for the image embedded in this frame. |
void |
setImageData(byte[] imageBytes)
Sets the image data for this frame. |
void |
setRawData(byte[] rawData)
Sets the raw data corresponding to this frame. |
java.lang.String |
toString()
Returns a String representation of this frame. |
Methods inherited from class com.tffenterprises.music.tag.id3v2.frame.TextBasedFrame |
---|
getNullBytes, getTextEncoding, getTextEncoding, getTextEncoding, is8859String, read8859Characters, read8859String, readCharacters, readString, readUnicodeCharacters, readUnicodeString |
Methods inherited from class com.tffenterprises.music.tag.id3v2.frame.BaseFrame |
---|
getBytes, getChecksum, getFormatFlags, getFrameID, getHeader, getStatusFlags, hashCode, isChanged, setChanged, setFormatFlags, setStatusFlags, toByteArray, updateChecksum, writeTo |
Methods inherited from class com.tffenterprises.music.tag.id3v2.Frame |
---|
FromByteArray, FromByteArray, FromInputStream, GetFrameClassForID, getNewInstance, getNewInstance, getNewInstance, MinimumLength, RegisterFrameClass, UnregisterFrameClass |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String MY_ID
private java.lang.String imageDescription
private java.lang.String imageMimeType
private byte imageType
private byte[] imageData
Constructor Detail |
---|
public APICFrame()
public APICFrame(FrameHeader header) throws java.lang.IllegalArgumentException
header
- The FrameHeader to be used for this Frame instance.
See FrameHeader
for details.
java.lang.IllegalArgumentException
- This is exception is thrown when
the parameter is unacceptable for
use with an object of this
Frame class/subclass.public APICFrame(FrameHeader header, java.lang.String description, byte[] image) throws java.lang.IllegalArgumentException
header
- The FrameHeader to be used for this Frame instance.
See FrameHeader
for details.description
- An image description.image
- The image as bytes.
java.lang.IllegalArgumentException
- if the specified frame type,
the specified frame description,
or the specified frame value is null.Method Detail |
---|
public java.lang.Object clone()
clone
in class BaseFrame
public boolean equals(java.lang.Object other)
equals
in class BaseFrame
other
- The other object.
public java.lang.String toString()
toString
in class BaseFrame
public byte[] getRawData()
getRawData
in class BaseFrame
public void setRawData(byte[] rawData) throws FrameDataFormatException, java.lang.IllegalArgumentException
setRawData
in class BaseFrame
rawData
- The raw data.
FrameDataFormatException
- if the raw data is not in an
appropriate format for this
frame's type.
java.lang.IllegalArgumentException
- if the specified raw data is null.public boolean isOfRepeatableType()
isOfRepeatableType
in interface KeyedFrame
isOfRepeatableType
in class BaseFrame
public java.lang.String getDescription()
getDescription
in interface KeyedFrame
public void setDescription(java.lang.String frameDescription)
frameDescription
- The description text.
java.lang.IllegalArgumentException
- if the description text is null.public byte[] getImageData()
public void setImageData(byte[] imageBytes)
imageBytes
- the new image data for this frame.
java.lang.IllegalArgumentException
- if the array points to null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |