jautil
Class FourCCUtil

java.lang.Object
  extended by jautil.FourCCUtil

public class FourCCUtil
extends java.lang.Object

FourCCUtil provides a set of class (that is, static) utility methods for handling four-cc tags.


Field Summary
static int NULL_FOURCC
          The null 4-cc value.
 
Constructor Summary
FourCCUtil()
           
 
Method Summary
static int fixFourCCInt(int tag)
          Purges spurious trailing space(s) from the given 4-cc tag value: if such space characters are present a new value is returned in which they have been replaced with NUL values, but if not the original valid tag is returned unchanged.
static void fourCCBytes(int tag, FourCCBytes fccb)
          Sets the given FourCCBytes object to match the given 4-cc tag value.
static int fourCCInt(java.lang.String name)
          Returns the 4-cc value for the given 4-cc name, whose length should not exceed four.
static java.lang.String fourCCString(int tag)
          Returns the unpadded string representation of the given 4-cc tag.
static java.lang.String fourCCStringPadded(int tag)
          Returns the unpadded string representation of the given 4-cc tag, padded to length 4 with spaces if necessary.
static boolean isNonNull(int fourcc)
          Tests whether the given 4-cc value is non-null.
static boolean isNull(int fourcc)
          Tests whether the given 4-cc value is null.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_FOURCC

public static final int NULL_FOURCC
The null 4-cc value.

See Also:
Constant Field Values
Constructor Detail

FourCCUtil

public FourCCUtil()
Method Detail

fourCCInt

public static int fourCCInt(java.lang.String name)
Returns the 4-cc value for the given 4-cc name, whose length should not exceed four.


fourCCString

public static java.lang.String fourCCString(int tag)
Returns the unpadded string representation of the given 4-cc tag.


fourCCStringPadded

public static java.lang.String fourCCStringPadded(int tag)
Returns the unpadded string representation of the given 4-cc tag, padded to length 4 with spaces if necessary.


fourCCBytes

public static void fourCCBytes(int tag,
                               FourCCBytes fccb)
Sets the given FourCCBytes object to match the given 4-cc tag value.


fixFourCCInt

public static int fixFourCCInt(int tag)
Purges spurious trailing space(s) from the given 4-cc tag value: if such space characters are present a new value is returned in which they have been replaced with NUL values, but if not the original valid tag is returned unchanged.


isNull

public static boolean isNull(int fourcc)
Tests whether the given 4-cc value is null.


isNonNull

public static boolean isNonNull(int fourcc)
Tests whether the given 4-cc value is non-null.