com.dusbabek.lib.id3
Class FrameHeader_v2_2

java.lang.Object
  extended by com.dusbabek.lib.id3.FrameHeader_v2_2
All Implemented Interfaces:
FrameHeader

public class FrameHeader_v2_2
extends java.lang.Object
implements FrameHeader

Frame header for ID3v2.2. Nice and simple...


Field Summary
static int FRAME_HEADER_LEN
          basic header size is always 6 bytes.
 
Constructor Summary
FrameHeader_v2_2(byte[] data)
          construct a header from raw data
FrameHeader_v2_2(java.lang.String id)
          construct an empty header using a specified frame id.
 
Method Summary
 boolean compressed()
          
 java.lang.String getId()
          
 int getSize()
          
 long getUncompressedSize()
          
 void setFrameSize(int size)
          set the frame data size
 int sizeOf()
          
 void write(java.io.OutputStream out)
          write header to a stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FRAME_HEADER_LEN

public static final int FRAME_HEADER_LEN
basic header size is always 6 bytes.

See Also:
Constant Field Values
Constructor Detail

FrameHeader_v2_2

public FrameHeader_v2_2(java.lang.String id)
                 throws java.io.IOException
construct an empty header using a specified frame id.

Throws:
java.io.IOException

FrameHeader_v2_2

public FrameHeader_v2_2(byte[] data)
                 throws java.io.IOException
construct a header from raw data

Throws:
java.io.IOException
Method Detail

setFrameSize

public void setFrameSize(int size)
set the frame data size

Specified by:
setFrameSize in interface FrameHeader

getSize

public int getSize()

Specified by:
getSize in interface FrameHeader
Returns:
the size of frame data

getId

public java.lang.String getId()

Specified by:
getId in interface FrameHeader
Returns:
the frame id

sizeOf

public int sizeOf()

Specified by:
sizeOf in interface FrameHeader
Returns:
the size of the frame header (includes extended headers)

write

public void write(java.io.OutputStream out)
           throws java.io.IOException
write header to a stream

Specified by:
write in interface FrameHeader
Throws:
java.io.IOException

compressed

public boolean compressed()

Specified by:
compressed in interface FrameHeader
Returns:
true if frame is compressed

getUncompressedSize

public long getUncompressedSize()

Specified by:
getUncompressedSize in interface FrameHeader
Returns:
the uncompressed size of the frame data


Copyright © 2004, 2005 Gary Dusbabek. All Rights Reserved.