javazoom.jl.converter
Class RiffFile

java.lang.Object
  extended by javazoom.jl.converter.RiffFile
Direct Known Subclasses:
WaveFile

public class RiffFile
extends java.lang.Object

Class to manage RIFF files


Field Summary
static int DDC_FAILURE
           
static int DDC_FILE_ERROR
           
static int DDC_INVALID_CALL
           
static int DDC_INVALID_FILE
           
static int DDC_OUT_OF_MEMORY
           
static int DDC_SUCCESS
           
static int DDC_USER_ABORT
           
protected  java.io.RandomAccessFile file
           
protected  int fmode
           
static int RFM_READ
           
static int RFM_UNKNOWN
           
static int RFM_WRITE
           
 
Constructor Summary
RiffFile()
          Dummy Constructor
 
Method Summary
 int Backpatch(long FileOffset, byte[] Data, int NumBytes)
           
 int Backpatch(long FileOffset, javazoom.jl.converter.RiffFile.RiffChunkHeader Data, int NumBytes)
          Write Data to specified offset.
 int Close()
          Close Riff File.
 int CurrentFileMode()
          Return File Mode.
 long CurrentFilePosition()
          Return File Position.
 int Expect(java.lang.String Data, int NumBytes)
          Expect NumBytes data.
static int FourCC(java.lang.String ChunkName)
          Fill the header.
 int Open(java.lang.String Filename, int NewMode)
          Open a RIFF file.
 int Read(byte[] Data, int NumBytes)
          Read NumBytes data.
protected  int Seek(long offset)
          Seek in the File.
 int Write(byte[] Data, int NumBytes)
          Write NumBytes data.
 int Write(int Data, int NumBytes)
          Write NumBytes data.
 int Write(javazoom.jl.converter.RiffFile.RiffChunkHeader Triff_header, int NumBytes)
          Write NumBytes data.
 int Write(short[] Data, int NumBytes)
          Write NumBytes data.
 int Write(short Data, int NumBytes)
          Write NumBytes data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DDC_SUCCESS

public static final int DDC_SUCCESS
See Also:
Constant Field Values

DDC_FAILURE

public static final int DDC_FAILURE
See Also:
Constant Field Values

DDC_OUT_OF_MEMORY

public static final int DDC_OUT_OF_MEMORY
See Also:
Constant Field Values

DDC_FILE_ERROR

public static final int DDC_FILE_ERROR
See Also:
Constant Field Values

DDC_INVALID_CALL

public static final int DDC_INVALID_CALL
See Also:
Constant Field Values

DDC_USER_ABORT

public static final int DDC_USER_ABORT
See Also:
Constant Field Values

DDC_INVALID_FILE

public static final int DDC_INVALID_FILE
See Also:
Constant Field Values

RFM_UNKNOWN

public static final int RFM_UNKNOWN
See Also:
Constant Field Values

RFM_WRITE

public static final int RFM_WRITE
See Also:
Constant Field Values

RFM_READ

public static final int RFM_READ
See Also:
Constant Field Values

fmode

protected int fmode

file

protected java.io.RandomAccessFile file
Constructor Detail

RiffFile

public RiffFile()
Dummy Constructor

Method Detail

CurrentFileMode

public int CurrentFileMode()
Return File Mode.


Open

public int Open(java.lang.String Filename,
                int NewMode)
Open a RIFF file.


Write

public int Write(byte[] Data,
                 int NumBytes)
Write NumBytes data.


Write

public int Write(short[] Data,
                 int NumBytes)
Write NumBytes data.


Write

public int Write(javazoom.jl.converter.RiffFile.RiffChunkHeader Triff_header,
                 int NumBytes)
Write NumBytes data.


Write

public int Write(short Data,
                 int NumBytes)
Write NumBytes data.


Write

public int Write(int Data,
                 int NumBytes)
Write NumBytes data.


Read

public int Read(byte[] Data,
                int NumBytes)
Read NumBytes data.


Expect

public int Expect(java.lang.String Data,
                  int NumBytes)
Expect NumBytes data.


Close

public int Close()
Close Riff File. Length is written too.


CurrentFilePosition

public long CurrentFilePosition()
Return File Position.


Backpatch

public int Backpatch(long FileOffset,
                     javazoom.jl.converter.RiffFile.RiffChunkHeader Data,
                     int NumBytes)
Write Data to specified offset.


Backpatch

public int Backpatch(long FileOffset,
                     byte[] Data,
                     int NumBytes)

Seek

protected int Seek(long offset)
Seek in the File.


FourCC

public static int FourCC(java.lang.String ChunkName)
Fill the header.



JavaZOOM 1999-2008