FileDocCategorySizeDatePackage
FieldFrameBodyUnsupported.javaAPI DocJaudiotagger 2.0.44513Wed Mar 30 16:12:08 BST 2011org.jaudiotagger.tag.lyrics3

FieldFrameBodyUnsupported

public class FieldFrameBodyUnsupported extends AbstractLyrics3v2FieldFrameBody
author
: Paul Taylor
author
: Eric Farng Version @version:$Id: FieldFrameBodyUnsupported.java 836 2009-11-12 15:44:07Z paultaylor $ MusicTag Copyright (C)2003,2004 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, you can get a copy from http://www.opensource.org/licenses/lgpl-license.php or write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Description:

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.

param
value

        this.value = value;
    
public FieldFrameBodyUnsupported(ByteBuffer byteBuffer)
Creates a new FieldBodyUnsupported datatype.

param
byteBuffer
throws
org.jaudiotagger.tag.InvalidTagException


        this.read(byteBuffer);

    
Methods Summary
public booleanequals(java.lang.Object obj)

param
obj
return

        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.StringgetIdentifier()

return

        return "ZZZ";
    
public booleanisSubsetOf(java.lang.Object obj)

param
obj
return

        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 voidread(java.nio.ByteBuffer byteBuffer)

param
byteBuffer
throws
IOException

        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 voidsetupObjectList()
TODO


    
public java.lang.StringtoString()

return

        return getIdentifier() + " : " + (new String(value));
    
public voidwrite(java.io.RandomAccessFile file)

param
file
throws
IOException

        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);