fi.helsinki.cs.ohtu.mpeg2.audio.mpa
Enum MP123Header.ModeExtension

java.lang.Object
  extended by java.lang.Enum<MP123Header.ModeExtension>
      extended by fi.helsinki.cs.ohtu.mpeg2.audio.mpa.MP123Header.ModeExtension
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MP123Header.ModeExtension>
Enclosing class:
MP123Header

public static enum MP123Header.ModeExtension
extends java.lang.Enum<MP123Header.ModeExtension>

Represents the mode extension.


Enum Constant Summary
ME_00
          Layers I and II: join sub-bands 4-31, if joint stereo; Layer III: intensity stereo off, MS stereo off
ME_01
          Layers I and II: join sub-bands 8-31, if joint stereo; Layer III: intensity stereo on, MS stereo off
ME_10
          Layers I and II: join sub-bands 12-31, if joint stereo; Layer III: intensity stereo off, MS stereo on
ME_11
          Layers I and II: join sub-bands 16-31, if joint stereo; Layer III: intensity stereo on, MS stereo on
 
Field Summary
private  boolean iStereo
           
private  int jsbound
           
private  int modeExt
           
private  boolean msStereo
           
 
Method Summary
 int getJSBound()
          Returns the joint stereo bound for layers I and II.
 boolean isIntensityStereo()
          Returns whether intensity stereo is used for layer III.
 boolean isMSStereo()
          Returns whether MS stereo is used for layer III.
static MP123Header.ModeExtension valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MP123Header.ModeExtension[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 void writeTo(BitOutputStream stream)
          Encodes this ModeExtension to the given bit stream.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ME_00

public static final MP123Header.ModeExtension ME_00
Layers I and II: join sub-bands 4-31, if joint stereo; Layer III: intensity stereo off, MS stereo off


ME_01

public static final MP123Header.ModeExtension ME_01
Layers I and II: join sub-bands 8-31, if joint stereo; Layer III: intensity stereo on, MS stereo off


ME_10

public static final MP123Header.ModeExtension ME_10
Layers I and II: join sub-bands 12-31, if joint stereo; Layer III: intensity stereo off, MS stereo on


ME_11

public static final MP123Header.ModeExtension ME_11
Layers I and II: join sub-bands 16-31, if joint stereo; Layer III: intensity stereo on, MS stereo on

Field Detail

modeExt

private final int modeExt

jsbound

private final int jsbound

iStereo

private final boolean iStereo

msStereo

private final boolean msStereo
Method Detail

values

public static MP123Header.ModeExtension[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MP123Header.ModeExtension c : MP123Header.ModeExtension.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MP123Header.ModeExtension valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getJSBound

public int getJSBound()
Returns the joint stereo bound for layers I and II. Does not have a meaning for layer III.

Returns:
the joint stereo bound

isIntensityStereo

public boolean isIntensityStereo()
Returns whether intensity stereo is used for layer III. Does not have a meaning for layers I and II.

Returns:
true iff intensity stereo is used

isMSStereo

public boolean isMSStereo()
Returns whether MS stereo is used for layer III. Does not have a meaning for layers I and II.

Returns:
true iff MS stereo is used

writeTo

public void writeTo(BitOutputStream stream)
             throws java.io.IOException
Encodes this ModeExtension to the given bit stream.

Parameters:
stream - the stream to encode this ModeExtension to
Throws:
java.io.IOException