|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectentagged.audioformats.ape.util.ApeTagField
public abstract class ApeTagField
| Constructor Summary | |
|---|---|
ApeTagField(String id,
boolean binary)
|
|
| Method Summary | |
|---|---|
protected void |
copy(byte[] src,
byte[] dst,
int dstOffset)
|
abstract void |
copyContent(TagField field)
This method copies the data of the given filed to the current data. |
protected byte[] |
getBytes(String s,
String encoding)
|
String |
getId()
Returns the Id of the represented tag field. This value should uniquely identify a kind of tag data, like title. |
abstract byte[] |
getRawContent()
This method delivers the binary representation of the fields data in order to be directly written to the file. |
protected byte[] |
getSize(int size)
|
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 mehtod returns false. |
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 implemenation really using this method to perform useful operations. |
boolean |
isCommon()
Identifies a field to be of common use. Some software may differ between common and not common fields. |
abstract boolean |
isEmpty()
Determines whether the content of the field is empty. |
abstract String |
toString()
This method returns a human readable description of the fields contents. For text fields it should be the text itself. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ApeTagField(String id,
boolean binary)
| Method Detail |
|---|
public String getId()
TagFieldAbstractTag will use the "id" to summarize multiple
fields.
getId in interface TagFieldpublic boolean isBinary()
TagFieldfalse.
isBinary in interface TagFieldtrue if field represents binary data (not human
readable).public void isBinary(boolean b)
TagField
isBinary in interface TagFieldb - true, if the field contains binary data.public boolean isCommon()
TagField
isCommon in interface TagFieldtrue if the field is of common use.
protected void copy(byte[] src,
byte[] dst,
int dstOffset)
protected byte[] getSize(int size)
protected byte[] getBytes(String s,
String encoding)
throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic abstract boolean isEmpty()
TagField
isEmpty in interface TagFieldtrue if no data is stored (or empty String).public abstract String toString()
TagField
toString in interface TagFieldtoString in class Objectpublic abstract void copyContent(TagField field)
TagField
copyContent in interface TagFieldfield - The field containing the data to be taken.
public abstract byte[] getRawContent()
throws UnsupportedEncodingException
TagField
getRawContent in interface TagFieldUnsupportedEncodingException - Most tag data represents text. In some cases the underlying
implementation will need to convert the text data in java to
a specific charset encoding. In these cases an
UnsupportedEncodingException may occur.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||