Methods Summary |
---|
public void | createStructure()
|
public boolean | equals(java.lang.Object obj)Returns true if this datatype and its entire DataType array
list equals the argument. This datatype is equal to the argument if they
are the same class.
if (!(obj instanceof AbstractTagFrameBody))
{
return false;
}
AbstractTagFrameBody object = (AbstractTagFrameBody) obj;
boolean check =this.objectList.equals(object.objectList) && super.equals(obj);
return check;
|
public java.lang.String | getBriefDescription()This method calls toString for all it's objects and appends
them without any newline characters.
String str = "";
for (AbstractDataType object : objectList)
{
if ((object.toString() != null) && (object.toString().length() > 0))
{
str += (object.getIdentifier() + "=\"" + object.toString() + "\"; ");
}
}
return str;
|
public AbstractTagFrame | getHeader()Get Reference to header
return header;
|
public final java.lang.String | getLongDescription()This method calls toString for all it's objects and appends
them. It contains new line characters and is more suited for display
purposes
String str = "";
for (AbstractDataType object : objectList)
{
if ((object.toString() != null) && (object.toString().length() > 0))
{
str += (object.getIdentifier() + " = " + object.toString() + "\n");
}
}
return str;
|
public final org.jaudiotagger.tag.datatype.AbstractDataType | getObject(java.lang.String identifier)Returns the datatype with the specified
identifier
AbstractDataType object;
Iterator<AbstractDataType> iterator = objectList.listIterator();
while (iterator.hasNext())
{
object = iterator.next();
if (object.getIdentifier().equals(identifier))
{
return object;
}
}
return null;
|
public final java.lang.Object | getObjectValue(java.lang.String identifier)Returns the value of the datatype with the specified
identifier
return getObject(identifier).getValue();
|
public int | getSize()Returns the size in bytes of this fragmentbody
int size = 0;
AbstractDataType object;
Iterator<AbstractDataType> iterator = objectList.listIterator();
while (iterator.hasNext())
{
object = iterator.next();
size += object.getSize();
}
return size;
|
public final byte | getTextEncoding()Return the Text Encoding
AbstractDataType o = getObject(DataTypes.OBJ_TEXT_ENCODING);
if (o != null)
{
Long encoding = (Long) (o.getValue());
return encoding.byteValue();
}
else
{
return TextEncoding.ISO_8859_1;
}
|
public java.lang.String | getUserFriendlyValue()
return toString();
|
public boolean | isSubsetOf(java.lang.Object obj)Returns true if this instance and its entire DataType
array list is a subset of the argument. This class is a subset if it is
the same class as the argument.
if (!(obj instanceof AbstractTagFrameBody))
{
return false;
}
ArrayList<AbstractDataType> superset = ((AbstractTagFrameBody) obj).objectList;
for (AbstractDataType anObjectList : objectList)
{
if (anObjectList.getValue() != null)
{
if (!superset.contains(anObjectList))
{
return false;
}
}
}
return true;
|
public java.util.Iterator | iterator()Returns an iterator of the DataType list.
return objectList.iterator();
|
public void | setHeader(AbstractTagFrame header)Set header
this.header = header;
|
public final void | setObjectValue(java.lang.String identifier, java.lang.Object value)Sets all objects of identifier type to value defined by obj argument.
AbstractDataType object;
Iterator<AbstractDataType> iterator = objectList.listIterator();
while (iterator.hasNext())
{
object = iterator.next();
if (object.getIdentifier().equals(identifier))
{
object.setValue(value);
}
}
|
public final void | setTextEncoding(byte textEncoding)Set the Text Encoding to use for this frame body
//Number HashMap actually converts this byte to a long
setObjectValue(DataTypes.OBJ_TEXT_ENCODING, textEncoding);
|
protected abstract void | setupObjectList()Create the list of Datatypes that this body
expects in the correct order This method needs to be implemented by concrete subclasses
|
public java.lang.String | toString()Return brief description of FrameBody
return getBriefDescription();
|