FieldFrameBodyUnsupportedpublic class FieldFrameBodyUnsupported extends AbstractLyrics3v2FieldFrameBody
Fields Summary |
---|
private byte[] | value |
Constructors Summary |
---|
public FieldFrameBodyUnsupported()Creates a new FieldBodyUnsupported datatype.
// this.value = new byte[0];
| public FieldFrameBodyUnsupported(FieldFrameBodyUnsupported copyObject)
super(copyObject);
this.value = copyObject.value.clone();
| public FieldFrameBodyUnsupported(byte[] value)Creates a new FieldBodyUnsupported datatype.
this.value = value;
| public FieldFrameBodyUnsupported(ByteBuffer byteBuffer)Creates a new FieldBodyUnsupported datatype.
this.read(byteBuffer);
|
Methods Summary |
---|
public boolean | equals(java.lang.Object obj)
if (!(obj instanceof FieldFrameBodyUnsupported))
{
return false;
}
FieldFrameBodyUnsupported object = (FieldFrameBodyUnsupported) obj;
return java.util.Arrays.equals(this.value, object.value) && super.equals(obj);
| public java.lang.String | getIdentifier()
return "ZZZ";
| public boolean | isSubsetOf(java.lang.Object obj)
if (!(obj instanceof FieldFrameBodyUnsupported))
{
return false;
}
FieldFrameBodyUnsupported object = (FieldFrameBodyUnsupported) obj;
String subset = new String(this.value);
String superset = new String(object.value);
return superset.contains(subset) && super.isSubsetOf(obj);
| public void | read(java.nio.ByteBuffer byteBuffer)
int size;
byte[] buffer = new byte[5];
// read the 5 character size
byteBuffer.get(buffer, 0, 5);
size = Integer.parseInt(new String(buffer, 0, 5));
value = new byte[size];
// read the SIZE length description
byteBuffer.get(value);
| protected void | setupObjectList()TODO
| public java.lang.String | toString()
return getIdentifier() + " : " + (new String(value));
| public void | write(java.io.RandomAccessFile file)
int offset = 0;
String str;
byte[] buffer = new byte[5];
str = Integer.toString(value.length);
for (int i = 0; i < (5 - str.length()); i++)
{
buffer[i] = (byte) '0";
}
offset += (5 - str.length());
for (int i = 0; i < str.length(); i++)
{
buffer[i + offset] = (byte) str.charAt(i);
}
file.write(buffer);
file.write(value);
|
|