|
|||||||||
| 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
org.jaudiotagger.tag.id3.ID3v22Frame
public class ID3v22Frame
Represents an ID3v2.2 frame.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jaudiotagger.tag.id3.AbstractID3v2Frame |
|---|
AbstractID3v2Frame.EncodingFlags, AbstractID3v2Frame.StatusFlags |
| Field Summary | |
|---|---|
protected static int |
FRAME_HEADER_SIZE
|
protected static int |
FRAME_ID_SIZE
|
protected static int |
FRAME_SIZE_SIZE
|
private static java.util.regex.Pattern |
validFrameIdentifier
|
| Fields inherited from class org.jaudiotagger.tag.id3.AbstractID3v2Frame |
|---|
encodingFlags, frameSize, identifier, statusFlags, TYPE_FRAME, TYPE_FRAME_SIZE, UNSUPPORTED_ID |
| Fields inherited from class org.jaudiotagger.tag.id3.AbstractTagFrame |
|---|
frameBody |
| Fields inherited from class org.jaudiotagger.tag.id3.AbstractTagItem |
|---|
logger |
| Constructor Summary | |
|---|---|
ID3v22Frame()
|
|
ID3v22Frame(AbstractID3v2Frame frame)
Creates a new ID3v22 Frame from another frame of a different tag version |
|
ID3v22Frame(AbstractID3v2FrameBody body)
Creates a new ID3v22 Frame with given body |
|
ID3v22Frame(java.nio.ByteBuffer byteBuffer)
Deprecated. use ID3v22Frame(ByteBuffer,String) instead |
|
ID3v22Frame(java.nio.ByteBuffer byteBuffer,
java.lang.String loggingFilename)
Creates a new ID3v22Frame datatype by reading from byteBuffer. |
|
ID3v22Frame(ID3v22Frame frame)
Copy Constructor Creates a new v22 frame based on another v22 frame |
|
ID3v22Frame(java.lang.String identifier)
Creates a new ID3v22 Frame of type identifier. |
|
| Method Summary | |
|---|---|
void |
createStructure()
Return String Representation of body |
private void |
createV22FrameFromV23Frame(ID3v23Frame frame)
|
private int |
decodeSize(byte[] buffer)
Read Frame Size, which has to be decoded |
private void |
encodeSize(java.nio.ByteBuffer headerBuffer,
int size)
Write Frame Size (can now be accurately calculated, have to convert 4 byte int to 3 byte format. |
boolean |
equals(java.lang.Object obj)
Compare for equality To be deemed equal obj must be a IDv23Frame with the same identifier and the same flags. |
protected int |
getFrameHeaderSize()
|
protected int |
getFrameIdSize()
|
protected int |
getFrameSizeSize()
|
int |
getSize()
Return size of frame |
boolean |
isBinary()
Determines whether the represented field contains (is made up of) binary data, instead of text data. Software can identify fields to be displayed because they are human readable if this method returns false. |
boolean |
isCommon()
Identifies a field to be of common use. Some software may differ between common and not common fields. |
protected boolean |
isPadding(byte[] buffer)
|
boolean |
isValidID3v2FrameIdentifier(java.lang.String identifier)
Does the frame identifier meet the syntax for a idv3v2 frame identifier. |
void |
read(java.nio.ByteBuffer byteBuffer)
Read frame from file. |
void |
setEncoding(java.lang.String encoding)
Sets the charset encoding used by the field. |
void |
write(java.io.ByteArrayOutputStream tagBuffer)
Write Frame raw data |
| Methods inherited from class org.jaudiotagger.tag.id3.AbstractID3v2Frame |
|---|
copyContent, getContent, getEncoding, getEncodingFlags, getId, getIdentifier, getLoggingFilename, getRawContent, getStatusFlags, isBinary, isEmpty, readBody, readBody, readEncryptedBody, readIdentifier, setContent, setLoggingFilename |
| Methods inherited from class org.jaudiotagger.tag.id3.AbstractTagFrame |
|---|
getBody, isSubsetOf, setBody |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jaudiotagger.tag.TagField |
|---|
toString |
| Field Detail |
|---|
private static java.util.regex.Pattern validFrameIdentifier
protected static final int FRAME_ID_SIZE
protected static final int FRAME_SIZE_SIZE
protected static final int FRAME_HEADER_SIZE
| Constructor Detail |
|---|
public ID3v22Frame()
public ID3v22Frame(AbstractID3v2FrameBody body)
body - New body and frame is based on thispublic ID3v22Frame(java.lang.String identifier)
identifier - public ID3v22Frame(ID3v22Frame frame)
frame -
public ID3v22Frame(AbstractID3v2Frame frame)
throws InvalidFrameException
frame - to construct the new frame from
InvalidFrameException
public ID3v22Frame(java.nio.ByteBuffer byteBuffer,
java.lang.String loggingFilename)
throws InvalidFrameException,
InvalidDataTypeException
byteBuffer - to read fromloggingFilename -
InvalidFrameException
InvalidDataTypeException
public ID3v22Frame(java.nio.ByteBuffer byteBuffer)
throws InvalidFrameException,
InvalidDataTypeException
ID3v22Frame(ByteBuffer,String) instead
byteBuffer - to read from
InvalidFrameException
InvalidDataTypeException| Method Detail |
|---|
protected int getFrameIdSize()
getFrameIdSize in class AbstractID3v2Frameprotected int getFrameSizeSize()
getFrameSizeSize in class AbstractID3v2Frameprotected int getFrameHeaderSize()
getFrameHeaderSize in class AbstractID3v2Framepublic boolean equals(java.lang.Object obj)
equals in class AbstractID3v2Frameobj -
private void createV22FrameFromV23Frame(ID3v23Frame frame)
throws InvalidFrameException
InvalidFrameExceptionpublic int getSize()
getSize in class AbstractTagItemprotected boolean isPadding(byte[] buffer)
isPadding in class AbstractID3v2Frame
public void read(java.nio.ByteBuffer byteBuffer)
throws InvalidFrameException,
InvalidDataTypeException
read in class AbstractTagItembyteBuffer -
InvalidFrameException
InvalidDataTypeExceptionprivate int decodeSize(byte[] buffer)
buffer -
public void write(java.io.ByteArrayOutputStream tagBuffer)
write in class AbstractID3v2Framejava.io.IOException
private void encodeSize(java.nio.ByteBuffer headerBuffer,
int size)
headerBuffer - size - public boolean isValidID3v2FrameIdentifier(java.lang.String identifier)
identifier -
public void createStructure()
createStructure in class AbstractID3v2Framepublic boolean isCommon()
TagField
public boolean isBinary()
TagFieldfalse.
public void setEncoding(java.lang.String encoding)
encoding - charset.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||