org.jaudiotagger.tag.datatype
Class BooleanByte

java.lang.Object
  extended by org.jaudiotagger.tag.datatype.AbstractDataType
      extended by org.jaudiotagger.tag.datatype.BooleanByte

public class BooleanByte
extends AbstractDataType

Represents a bit flag within a byte


Field Summary
(package private)  int bitPosition
           
 
Fields inherited from class org.jaudiotagger.tag.datatype.AbstractDataType
frameBody, identifier, logger, size, TYPE_ELEMENT, value
 
Constructor Summary
BooleanByte(BooleanByte copy)
           
BooleanByte(java.lang.String identifier, AbstractTagFrameBody frameBody, int bitPosition)
          Creates a new ObjectBooleanByte datatype.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getBitPosition()
           
 int getSize()
          This defines the size in bytes of the datatype being held when read/written to file.
 void readByteArray(byte[] arr, int offset)
          This is the starting point for reading bytes from the file into the ID3 datatype starting at offset.
 java.lang.String toString()
           
 byte[] writeByteArray()
          Starting point write ID3 Datatype back to array of bytes.
 
Methods inherited from class org.jaudiotagger.tag.datatype.AbstractDataType
createStructure, getBody, getIdentifier, getValue, readByteArray, setBody, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bitPosition

int bitPosition
Constructor Detail

BooleanByte

public BooleanByte(java.lang.String identifier,
                   AbstractTagFrameBody frameBody,
                   int bitPosition)
Creates a new ObjectBooleanByte datatype.

Parameters:
identifier -
frameBody -
bitPosition -
Throws:
java.lang.IndexOutOfBoundsException

BooleanByte

public BooleanByte(BooleanByte copy)
Method Detail

getBitPosition

public int getBitPosition()
Returns:

getSize

public int getSize()
Description copied from class: AbstractDataType
This defines the size in bytes of the datatype being held when read/written to file.

Specified by:
getSize in class AbstractDataType
Returns:

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AbstractDataType
Parameters:
obj -
Returns:

readByteArray

public void readByteArray(byte[] arr,
                          int offset)
                   throws InvalidDataTypeException
Description copied from class: AbstractDataType
This is the starting point for reading bytes from the file into the ID3 datatype starting at offset. This class must be overridden

Specified by:
readByteArray in class AbstractDataType
Parameters:
arr -
offset -
Throws:
java.lang.NullPointerException
java.lang.IndexOutOfBoundsException
InvalidDataTypeException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:

writeByteArray

public byte[] writeByteArray()
Description copied from class: AbstractDataType
Starting point write ID3 Datatype back to array of bytes. This class must be overridden.

Specified by:
writeByteArray in class AbstractDataType
Returns: