|
DixShtix | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dixshtix.io.IOChunkHeader | +--com.dixshtix.riff.FourByteConstant
RIFF Chunk-type identifiers.
In RIFF files, related data items are grouped into "chunks." Each chunk has a four-byte ASCII Chunk identifier, followed immediately by a four-byte binary representation of the length of the remainder of the chunk. The Chunk identifier is to be composed only of upper and lowercase ASCII letters and may be padded on the right with ASCII spaces.
Chunks of type RIFF
or RIFX
are top-level
containers of little-endian or big-endian data, respectively. These
containers are called Forms in Microsoft parlance.
The first four bytes of the interior of a Form can be combined
with the type of the container to form a unique 8-byte identifier for
the Form.
Chunks of type LIST
are internal containers of LISTs and Chunks.
Like all Chunks, LISTs have a length. Like the Form Chunks, the first
four bytes of a LIST's interior contain a LIST type identifier.
Field Summary | |
int |
code
Internal representation. |
private static java.util.HashMap |
fccToNames
Cache for speedy toString() operation. |
static FourByteConstant |
IARL
Archival Location. |
static FourByteConstant |
IART
Artist. |
static FourByteConstant |
ICMS
Commissioned. |
static FourByteConstant |
ICMT
Comments. |
static FourByteConstant |
ICOP
Copyright. |
static FourByteConstant |
ICRD
Creation date. |
static FourByteConstant |
ICRP
Cropped. |
static FourByteConstant |
IDIM
Dimensions. |
static FourByteConstant |
IDPI
Dots Per Inch. |
static FourByteConstant |
IENG
Engineer. |
static FourByteConstant |
IGNR
Genre. |
static FourByteConstant |
IKEY
Keywords. |
static FourByteConstant |
ILGT
Lightness. |
static FourByteConstant |
IMED
Medium. |
static FourByteConstant |
INAM
Name. |
static FourByteConstant |
INFO
List type. |
static FourByteConstant |
IPLT
Palette Setting. |
static FourByteConstant |
IPRD
Product. |
static FourByteConstant |
ISBJ
Subject. |
static FourByteConstant |
ISFT
Software. |
static FourByteConstant |
ISHP
Sharpness. |
static FourByteConstant |
ISRC
Source. |
static FourByteConstant |
ISRF
Source Form. |
static FourByteConstant |
ITCH
Technician. |
static FourByteConstant |
JUNK
RIFF standard chunk type for padding bytes. |
static FourByteConstant |
LIST
Container type, has associated LIST type. |
private static java.util.HashMap |
namesToFCC
Reverse-lookup converting long strings to FourByteConstants. |
static FourByteConstant |
RIFF
Form type, Little-endian. |
static FourByteConstant |
RIFX
Form type, Big-endian. |
private java.lang.String |
stringValue
Optional string value. |
Constructor Summary | |
|
FourByteConstant(byte b0,
byte b1,
byte b2,
byte b3)
Purest constructor. |
|
FourByteConstant(char c0,
char c1,
char c2,
char c3)
ASCII Character constructor. |
protected |
FourByteConstant(int code)
Internal constructor. |
|
FourByteConstant(java.lang.String s)
Easy Constructor. |
|
FourByteConstant(java.lang.String s,
java.lang.String name)
Associate a name with a four-byte-constant. |
Method Summary | |
int |
compareTo(int fcc)
Directional ordering of FourByteConstants and integers. |
int |
compareTo(java.lang.Object o)
Directional ordering of FourByteConstants. |
boolean |
equals(int fcc)
Test for equality of contents. |
boolean |
equals(java.lang.Object fcc)
Test for equality of contents. |
int |
getLength()
|
int |
hashCode()
Compute hash code based on contents of the FourByteConstant. |
boolean |
isValid()
Verifies that this is a well-formed FourByteConstant. |
java.lang.String |
toString()
Most basic string representation of this FourByteConstant. |
void |
toString(java.io.PrintStream s)
|
void |
toString(java.lang.StringBuffer b)
|
void |
toString(java.io.Writer w)
|
Methods inherited from class java.lang.Object |
|
Field Detail |
private static java.util.HashMap fccToNames
toString()
operation.private static java.util.HashMap namesToFCC
public static final FourByteConstant RIFF
public static final FourByteConstant RIFX
public static final FourByteConstant LIST
public static final FourByteConstant INFO
public static final FourByteConstant IARL
public static final FourByteConstant IART
public static final FourByteConstant ICMS
public static final FourByteConstant ICMT
public static final FourByteConstant ICOP
public static final FourByteConstant ICRD
public static final FourByteConstant ICRP
public static final FourByteConstant IDIM
public static final FourByteConstant IDPI
public static final FourByteConstant IENG
public static final FourByteConstant IGNR
public static final FourByteConstant IKEY
public static final FourByteConstant ILGT
public static final FourByteConstant IMED
public static final FourByteConstant INAM
public static final FourByteConstant IPLT
public static final FourByteConstant IPRD
public static final FourByteConstant ISBJ
public static final FourByteConstant ISFT
public static final FourByteConstant ISHP
public static final FourByteConstant ISRC
public static final FourByteConstant ISRF
public static final FourByteConstant ITCH
public static final FourByteConstant JUNK
public final int code
private java.lang.String stringValue
Constructor Detail |
protected FourByteConstant(int code)
code
- Big-endian four byte constant.public FourByteConstant(byte b0, byte b1, byte b2, byte b3)
b0
- First byte.b1
- Second byte.b2
- Third byte.b3
- Fourth byte.public FourByteConstant(char c0, char c1, char c2, char c3)
c0
- First character.c1
- Second character.c2
- Third character.c3
- Fourth character.public FourByteConstant(java.lang.String s)
s
- A four-char alphanumeric string.public FourByteConstant(java.lang.String s, java.lang.String name)
s
- A four-char alphanumeric string.name
- A application-dependent name.Method Detail |
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
compareTo
in class IOChunkHeader
o
- Another FourByteConstant.public int compareTo(int fcc)
fcc
- A 32-bit big-endian representation of a FourByteConstant.public boolean equals(java.lang.Object fcc)
equals
in class IOChunkHeader
fcc
- Another FourByteConstant.public int getLength()
getLength
in class IOChunkHeader
public boolean equals(int fcc)
fcc
- A 32-bit big-endian representation of a FourByteConstant.public int hashCode()
hashCode
in class java.lang.Object
public boolean isValid()
isValid
in class IOChunkHeader
public void toString(java.lang.StringBuffer b)
toString
in class IOChunkHeader
public void toString(java.io.Writer w) throws java.io.IOException
toString
in class IOChunkHeader
public void toString(java.io.PrintStream s)
toString
in class IOChunkHeader
public java.lang.String toString()
toString
in class java.lang.Object
|
DixShtix | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |