|
|||||||||
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.Container
public abstract class Container
Container is a fake frame that holds multiple frames of the same type
in ID3v2's frame table. Many types of frames can have multiple occurrences
in a single ID3v2 tag, but they generally have a sub-key by which they
can be uniquely identified. The classes that represent such frames
must implement the
com.tffenterprises.music.tag.id3v2.frame.KeyedFrame
interface.
Field Summary | |
---|---|
private boolean |
changed
The changed bit for this frame. |
private java.lang.String |
frameid
The frame ID of the frames contained within. |
Constructor Summary | |
---|---|
Container()
Public default constructor. |
|
Container(java.lang.String id)
Container is not a "real" subclass of Frame. |
Method Summary | |
---|---|
abstract Frame |
addFrame(Frame frame)
|
java.lang.Object |
clone()
Returns a clone of this Container. |
abstract boolean |
contains(Frame frame)
|
boolean |
equals(java.lang.Object other)
Compares this Container with another object. |
abstract java.util.Enumeration |
frames()
|
java.util.zip.Checksum |
getChecksum()
Returns a checksum updated with this frame's data. |
byte |
getFormatFlags()
Returns the format flags of this frame. |
java.lang.String |
getFrameID()
Returns the frame ID of this frame. |
protected FrameHeader |
getHeader()
Returns this frame object's FrameHeader instance. |
byte[] |
getRawData()
Returns some raw data corresponding to this frame. |
byte |
getStatusFlags()
Returns the status flags of this frame. |
int |
hashCode()
Returns a hash code for this ID3v2 frame. |
boolean |
isChanged()
Returns true is this frame has been changed. |
abstract boolean |
isEmpty()
|
boolean |
isOfRepeatableType()
Returns whether it is correct for multiple frames of the same type as this one to coexist in the same ID3v2 tag. |
abstract Frame |
removeFrame(Frame frame)
|
void |
setChanged(boolean changed)
Sets the changed state of this frame |
void |
setFormatFlags(byte flags)
Sets the format flags of this frame. |
void |
setRawData(byte[] rawData)
Does nothing. |
void |
setStatusFlags(byte flags)
Sets the status flags of this frame. |
abstract int |
size()
|
byte[] |
toByteArray()
Returns a byte array containing the representation of all the contained frames, as they should be written to an ID3v2 tag. |
java.lang.String |
toString()
Returns a String representation of this frame. |
void |
updateChecksum(DataOutputChecksum checksum)
Returns a CheckSum object updated with this object. |
void |
writeTo(java.io.OutputStream outputStream)
Writes this tag to an output stream. |
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 java.lang.String frameid
private transient boolean changed
Constructor Detail |
---|
public Container()
public Container(java.lang.String id) throws java.lang.IllegalArgumentException
id
- the frame id of the frames to be contained in this Container.
java.lang.IllegalArgumentException
- This is exception is thrown when
the parameter is unacceptable or
unusable.Method Detail |
---|
public java.lang.Object clone()
clone
in class Frame
public void updateChecksum(DataOutputChecksum checksum)
frames()
method (as they should be), there is no need to override this method.
updateChecksum
in class Frame
checksum
- the checksum to updatepublic java.util.zip.Checksum getChecksum()
Frame
getChecksum
in class Frame
public final int hashCode()
hashCode
in class Frame
public boolean equals(java.lang.Object other)
equals
in class Frame
other
- The other object.
public java.lang.String toString()
Frame
toString
in class Frame
public java.lang.String getFrameID()
Frame
getFrameID
in class Frame
public byte getStatusFlags()
Frame
getStatusFlags
in class Frame
public void setStatusFlags(byte flags)
setStatusFlags
in class Frame
flags
- The new status flags.public byte getFormatFlags()
Frame
getFormatFlags
in class Frame
public void setFormatFlags(byte flags)
setFormatFlags
in class Frame
flags
- The new format flags.public boolean isChanged()
Frame
isChanged
in class Frame
public void setChanged(boolean changed)
setChanged
in class Frame
changed
- whether the frame is to be considered changed.public byte[] getRawData()
getRawData
in class Frame
public void setRawData(byte[] rawData)
setRawData
in class Frame
rawData
- The raw data.public byte[] toByteArray()
toByteArray
in class Frame
public void writeTo(java.io.OutputStream outputStream) throws java.io.IOException, java.lang.IllegalArgumentException
writeTo
in class Frame
outputStream
- The output stream.
java.io.IOException
- if there is a problem writing to the
stream.
java.lang.IllegalArgumentException
- if the specified output stream
is null.public boolean isOfRepeatableType()
isOfRepeatableType
in class Frame
protected FrameHeader getHeader()
FrameHeader
instance.
getHeader
in class Frame
FrameHeader
instance.public abstract Frame addFrame(Frame frame) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public abstract Frame removeFrame(Frame frame)
public abstract java.util.Enumeration frames()
public abstract boolean contains(Frame frame)
public abstract boolean isEmpty()
public abstract int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |