|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaudiotagger.tag.id3.AbstractTagItem
org.jaudiotagger.tag.id3.AbstractTagFrame
org.jaudiotagger.tag.id3.AbstractID3v2Frame
public abstract class AbstractID3v2Frame
This abstract class is each frame header inside a ID3v2 tag.
Nested Class Summary | |
---|---|
(package private) class |
AbstractID3v2Frame.EncodingFlags
|
class |
AbstractID3v2Frame.StatusFlags
|
Field Summary | |
---|---|
(package private) AbstractID3v2Frame.EncodingFlags |
encodingFlags
This holds the Encoding flags (not supported in v2.20) |
protected int |
frameSize
|
protected java.lang.String |
identifier
|
private java.lang.String |
loggingFilename
|
(package private) AbstractID3v2Frame.StatusFlags |
statusFlags
This holds the Status flags (not supported in v2.20 |
protected static java.lang.String |
TYPE_FRAME
|
protected static java.lang.String |
TYPE_FRAME_SIZE
|
protected static java.lang.String |
UNSUPPORTED_ID
|
Fields inherited from class org.jaudiotagger.tag.id3.AbstractTagFrame |
---|
frameBody |
Fields inherited from class org.jaudiotagger.tag.id3.AbstractTagItem |
---|
logger |
Constructor Summary | |
---|---|
protected |
AbstractID3v2Frame()
Create an empty frame |
|
AbstractID3v2Frame(AbstractID3v2Frame frame)
Create a frame based on another frame |
|
AbstractID3v2Frame(AbstractID3v2FrameBody body)
Create a frame based on a body |
|
AbstractID3v2Frame(java.lang.String identifier)
Create a new frame with empty body based on identifier |
Method Summary | |
---|---|
void |
copyContent(TagField field)
This method copies the data of the given field to the current data. |
void |
createStructure()
Return String Representation of frame |
boolean |
equals(java.lang.Object obj)
Returns true if this datatype and its body equals the argument and its body. |
java.lang.String |
getContent()
Returns the content of the field. |
java.lang.String |
getEncoding()
Returns the current used charset encoding. |
AbstractID3v2Frame.EncodingFlags |
getEncodingFlags()
|
protected abstract int |
getFrameHeaderSize()
|
protected abstract int |
getFrameIdSize()
|
protected abstract int |
getFrameSizeSize()
|
java.lang.String |
getId()
Return the frame identifier, this only identifies the frame it does not provide a unique key, when using frames such as TXXX which are used by many fields * |
java.lang.String |
getIdentifier()
Return the frame identifier |
protected java.lang.String |
getLoggingFilename()
Retrieve the logging filename to be used in debugging |
byte[] |
getRawContent()
This method delivers the binary representation of the fields data in order to be directly written to the file. |
AbstractID3v2Frame.StatusFlags |
getStatusFlags()
|
void |
isBinary(boolean b)
This method will set the field to represent binary data. Some implementations may support conversions. As of now (Octobre 2005) there is no implementation really using this method to perform useful operations. |
boolean |
isEmpty()
Determines whether the content of the field is empty. |
protected boolean |
isPadding(byte[] buffer)
|
protected AbstractID3v2FrameBody |
readBody(java.lang.String identifier,
AbstractID3v2FrameBody body)
This creates a new body based of type identifier but populated by the data in the body. |
protected AbstractID3v2FrameBody |
readBody(java.lang.String identifier,
java.nio.ByteBuffer byteBuffer,
int frameSize)
Read the frame body from the specified file via the buffer |
protected AbstractID3v2FrameBody |
readEncryptedBody(java.lang.String identifier,
java.nio.ByteBuffer byteBuffer,
int frameSize)
Read the frameBody when frame marked as encrypted |
protected java.lang.String |
readIdentifier(java.nio.ByteBuffer byteBuffer)
Get the next frame id, throwing an exception if unable to do this and check against just having padded data |
void |
setContent(java.lang.String content)
Sets the content of the field. |
protected void |
setLoggingFilename(java.lang.String loggingFilename)
Set logging filename when construct tag for read from file |
abstract void |
write(java.io.ByteArrayOutputStream tagBuffer)
|
Methods inherited from class org.jaudiotagger.tag.id3.AbstractTagFrame |
---|
getBody, isSubsetOf, setBody |
Methods inherited from class org.jaudiotagger.tag.id3.AbstractTagItem |
---|
getSize, read |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jaudiotagger.tag.TagTextField |
---|
setEncoding |
Methods inherited from interface org.jaudiotagger.tag.TagField |
---|
isBinary, isCommon, toString |
Field Detail |
---|
protected static final java.lang.String TYPE_FRAME
protected static final java.lang.String TYPE_FRAME_SIZE
protected static final java.lang.String UNSUPPORTED_ID
protected java.lang.String identifier
protected int frameSize
private java.lang.String loggingFilename
AbstractID3v2Frame.StatusFlags statusFlags
AbstractID3v2Frame.EncodingFlags encodingFlags
Constructor Detail |
---|
protected AbstractID3v2Frame()
public AbstractID3v2Frame(AbstractID3v2Frame frame)
frame
- public AbstractID3v2Frame(AbstractID3v2FrameBody body)
body
- public AbstractID3v2Frame(java.lang.String identifier)
identifier
- Method Detail |
---|
protected abstract int getFrameIdSize()
protected abstract int getFrameSizeSize()
protected abstract int getFrameHeaderSize()
protected java.lang.String getLoggingFilename()
protected void setLoggingFilename(java.lang.String loggingFilename)
loggingFilename
- public java.lang.String getId()
getId
in interface TagField
public java.lang.String getIdentifier()
getIdentifier
in class AbstractTagItem
public void copyContent(TagField field)
TagField
copyContent
in interface TagField
field
- The field containing the data to be taken.protected AbstractID3v2FrameBody readEncryptedBody(java.lang.String identifier, java.nio.ByteBuffer byteBuffer, int frameSize) throws InvalidFrameException, InvalidDataTypeException
identifier
- byteBuffer
- frameSize
-
InvalidFrameException
InvalidDataTypeException
InvalidTagException
protected boolean isPadding(byte[] buffer)
protected AbstractID3v2FrameBody readBody(java.lang.String identifier, java.nio.ByteBuffer byteBuffer, int frameSize) throws InvalidFrameException, InvalidDataTypeException
identifier
- the frame identifierbyteBuffer
- to read the frame body fromframeSize
-
InvalidFrameException
- unable to construct a framebody from the data
InvalidDataTypeException
protected java.lang.String readIdentifier(java.nio.ByteBuffer byteBuffer) throws PaddingException, InvalidFrameException
byteBuffer
-
PaddingException
InvalidFrameException
protected AbstractID3v2FrameBody readBody(java.lang.String identifier, AbstractID3v2FrameBody body) throws InvalidFrameException
identifier
- to determine type of the framebody
-
InvalidFrameException
- if unable to construct a framebody for the identifier and body provided.public byte[] getRawContent()
TagField
getRawContent
in interface TagField
public abstract void write(java.io.ByteArrayOutputStream tagBuffer)
public void isBinary(boolean b)
TagField
isBinary
in interface TagField
b
- public boolean isEmpty()
TagField
isEmpty
in interface TagField
true
if no data is stored (or empty String).public AbstractID3v2Frame.StatusFlags getStatusFlags()
public AbstractID3v2Frame.EncodingFlags getEncodingFlags()
public void createStructure()
public boolean equals(java.lang.Object obj)
AbstractTagFrame
getSubId
id string.
equals
in class AbstractTagFrame
obj
- datatype to determine equality of
public java.lang.String getContent()
getContent
in interface TagTextField
public java.lang.String getEncoding()
getEncoding
in interface TagTextField
public void setContent(java.lang.String content)
setContent
in interface TagTextField
content
- fields content.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |