DixShtix

com.dixshtix.riff
Class Dump

java.lang.Object
  |
  +--com.dixshtix.riff.Dump
Direct Known Subclasses:
ToXML

public class Dump
extends java.lang.Object

Dump chunk information about a riff file.

SYNOPSIS

riffdump file.rif
The layout of the RIFF file is dumped to the standard output. No data (contents) are revealed. If file.riff is the standard 84-byte test file produced from ExampleABCDE, then the output looks like this.
-------
id: <RIFF>
size: <76>
type: <FRMA>
  -------
  id: <CHKB>
  size: <0>
  -------
  id: <LIST>
  size: <56>
  type: <LSTC>
    -------
    id: <CHKD>
    size: <18>
    -------
    id: <CHKE>
    size: <18>

Based on code placed in the Public Domain 1995,1996 Timothy Butler.


Field Summary
protected  InStream in
          RIFF input stream.
protected  java.io.PrintStream out
          Output stream.
static java.lang.String Progname
          The marketing name by which this program is known.
static java.lang.String rcsid
          Information about the source file of this class.
 
Constructor Summary
Dump(java.io.InputStream io, java.io.PrintStream pw)
          Easy constructor.
Dump(InStream riff, java.io.PrintStream pw)
          Expert constructor.
 
Method Summary
protected  java.lang.String doIndent(int indent)
          Internal routine to pretty-print output.
(package private)  void dumpchunk(InStream prf, FourByteConstant fcc, int indent)
          Descend into the RIFF file hierarchy, recursively printing chunks.
(package private)  void dumpchunk(InStream prf, int indent)
          Descend into the RIFF file hierarchy, recursively printing chunks.
(package private)  void dumpchunk(InStream prf, IOChunk chunk, int indent)
          Print Chunk and then descend recursively into the RIFF file hierarchy.
 void main()
          Main routine for opening a RIFF file and dumping schematic of contents to the out;
static void main(java.lang.String[] args)
          Main routine for opening a RIFF file and dumping schematic of contents to the System.out;
(package private) static void usage(java.io.PrintStream ps)
          List program arguments for user.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

rcsid

public static java.lang.String rcsid
Information about the source file of this class.

Progname

public static java.lang.String Progname
The marketing name by which this program is known.

in

protected InStream in
RIFF input stream.

out

protected java.io.PrintStream out
Output stream.
Constructor Detail

Dump

public Dump(InStream riff,
            java.io.PrintStream pw)
Expert constructor.

Dump

public Dump(java.io.InputStream io,
            java.io.PrintStream pw)
Easy constructor.
Method Detail

usage

static void usage(java.io.PrintStream ps)
List program arguments for user.

main

public static void main(java.lang.String[] args)
Main routine for opening a RIFF file and dumping schematic of contents to the System.out;

doIndent

protected java.lang.String doIndent(int indent)
Internal routine to pretty-print output.

dumpchunk

void dumpchunk(InStream prf,
               int indent)
Descend into the RIFF file hierarchy, recursively printing chunks.
Parameters:
prf - An input stream of RIFF data, positioned just prior to a chunk.
indent - State for the doIndent(int) routine.

dumpchunk

void dumpchunk(InStream prf,
               FourByteConstant fcc,
               int indent)
Descend into the RIFF file hierarchy, recursively printing chunks.
Parameters:
prf - An input stream of RIFF data, where fcc has already been read.
fcc - The first four bytes of the current RIFF chunk.
indent - State for the doIndent(int) routine.

dumpchunk

void dumpchunk(InStream prf,
               IOChunk chunk,
               int indent)
Print Chunk and then descend recursively into the RIFF file hierarchy.
Parameters:
prf - An input stream of RIFF data.
chunk - The enclosing chunk, to be printed.
indent - State for the doIndent(int) routine.

main

public void main()
Main routine for opening a RIFF file and dumping schematic of contents to the out;

DixShtix