Sharkysoft home

Class Riff


public class Riff
extends java.lang.Object

RIFF file constants.

Details: Riff contains functions and constants that are useful when processing RIFF files.

Field Summary
static int RIFF_TAG
          RIFF tag.
Method Summary
static java.lang.String decodeTag(int itag)
          Decodes tag.
static int makeIntTag(java.lang.String stag)
          Encodes chunk tag.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final int RIFF_TAG
RIFF tag.

Details: This member defines the 'RIFF' tag, or the "magic number" found in the first four bytes of a RIFF file.

Method Detail


public static final int makeIntTag(java.lang.String stag)
Encodes chunk tag.

Details: makeIntTag generates an int that represents a four character chunk tag (chunk type identifier). This function is used primarily to form the chunk tag constants that are used in other RIFF-related classes in this package. (In this package, tags are processed as ints, rather than strings, because comparing two ints is more efficient than comparing two strings.) The MSB of the returned int is the first character in the tag string. The tag must be exactly four 8-bit characters. (Pad with spaces if necessary.)

stag - the tag in String form
the tag in int form
See Also:


public static final java.lang.String decodeTag(int itag)
Decodes tag.

Details: decodeTag converts a chunk tag (chunk type identifier) from its int form to String form. This is the inverse function of makeIntTag.

itag - the tag in int form
the tag in String form
See Also:

Sharkysoft home