com.sun.media.sound
Class RIFFReader

java.lang.Object
  extended by java.io.InputStream
      extended by com.sun.media.sound.RIFFReader
All Implemented Interfaces:
java.io.Closeable

public class RIFFReader
extends java.io.InputStream

Resource Interchange File Format (RIFF) stream decoder.

Author:
Karl Helgason

Constructor Summary
RIFFReader(java.io.InputStream stream)
           
 
Method Summary
 int available()
           
 void close()
           
 void finish()
           
 long getFilePointer()
           
 java.lang.String getFormat()
           
 long getSize()
           
 java.lang.String getType()
           
 boolean hasNextChunk()
           
 RIFFReader nextChunk()
           
 int read()
           
 int read(byte[] b, int offset, int len)
           
 byte readByte()
           
 void readFully(byte[] b)
           
 void readFully(byte[] b, int off, int len)
           
 int readInt()
           
 long readLong()
           
 short readShort()
           
 java.lang.String readString(int len)
           
 int readUnsignedByte()
           
 long readUnsignedInt()
           
 int readUnsignedShort()
           
 long skip(long n)
           
 long skipBytes(long n)
           
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RIFFReader

public RIFFReader(java.io.InputStream stream)
           throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getFilePointer

public long getFilePointer()
                    throws java.io.IOException
Throws:
java.io.IOException

hasNextChunk

public boolean hasNextChunk()
                     throws java.io.IOException
Throws:
java.io.IOException

nextChunk

public RIFFReader nextChunk()
                     throws java.io.IOException
Throws:
java.io.IOException

getFormat

public java.lang.String getFormat()

getType

public java.lang.String getType()

getSize

public long getSize()

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] b,
                int offset,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

readFully

public final void readFully(byte[] b)
                     throws java.io.IOException
Throws:
java.io.IOException

readFully

public final void readFully(byte[] b,
                            int off,
                            int len)
                     throws java.io.IOException
Throws:
java.io.IOException

skipBytes

public final long skipBytes(long n)
                     throws java.io.IOException
Throws:
java.io.IOException

skip

public long skip(long n)
          throws java.io.IOException
Overrides:
skip in class java.io.InputStream
Throws:
java.io.IOException

available

public int available()
Overrides:
available in class java.io.InputStream

finish

public void finish()
            throws java.io.IOException
Throws:
java.io.IOException

readString

public java.lang.String readString(int len)
                            throws java.io.IOException
Throws:
java.io.IOException

readByte

public byte readByte()
              throws java.io.IOException
Throws:
java.io.IOException

readShort

public short readShort()
                throws java.io.IOException
Throws:
java.io.IOException

readInt

public int readInt()
            throws java.io.IOException
Throws:
java.io.IOException

readLong

public long readLong()
              throws java.io.IOException
Throws:
java.io.IOException

readUnsignedByte

public int readUnsignedByte()
                     throws java.io.IOException
Throws:
java.io.IOException

readUnsignedShort

public int readUnsignedShort()
                      throws java.io.IOException
Throws:
java.io.IOException

readUnsignedInt

public long readUnsignedInt()
                     throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException