javaFlacEncoder
Class MetadataBlockHeader

java.lang.Object
  extended by javaFlacEncoder.MetadataBlockHeader

public class MetadataBlockHeader
extends java.lang.Object

The MetadataBlockHeader class is used to creat FLAC compliant Metadata Block Headers. See the FLAC specification for more information.

Author:
Preston Lacey

Nested Class Summary
static class MetadataBlockHeader.MetadataBlockType
          Enum containing the different Metadata block types.
 
Constructor Summary
MetadataBlockHeader()
          Constructor.
 
Method Summary
static EncodedElement getMetadataBlockHeader(boolean lastBlock, MetadataBlockHeader.MetadataBlockType type, int length)
          Create a meta-data block header of the given type, and return the result in a new EncodedElement(so data is ready to be placed directly in FLAC stream)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataBlockHeader

public MetadataBlockHeader()
Constructor. This class defines no instance variables and only static methods.

Method Detail

getMetadataBlockHeader

public static EncodedElement getMetadataBlockHeader(boolean lastBlock,
                                                    MetadataBlockHeader.MetadataBlockType type,
                                                    int length)
Create a meta-data block header of the given type, and return the result in a new EncodedElement(so data is ready to be placed directly in FLAC stream)

Parameters:
lastBlock - True if this is the last meta-block in the stream. False otherwise.
type - enum indicating which type of block we're creating.
length - Length of the meta-data block which follows this header.
Returns:
EncodedElement containing the header.