rasmus.util.riff
Class ChunkReader

java.lang.Object
  extended by java.io.InputStream
      extended by rasmus.util.riff.ChunkReader
All Implemented Interfaces:
java.io.Closeable
Direct Known Subclasses:
RiffReader

public class ChunkReader
extends java.io.InputStream


Field Summary
protected  long avail
           
protected  long ckSize
           
 
Constructor Summary
ChunkReader(java.io.InputStream stream)
           
 
Method Summary
 int available()
           
 void close()
           
 void finish()
           
 long getSize()
           
 boolean hasNextChunk()
           
 RiffReader nextChunk()
           
 int read()
           
 int read(byte[] b)
           
 long skip(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
 

Field Detail

ckSize

protected long ckSize

avail

protected long avail
Constructor Detail

ChunkReader

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

getSize

public long getSize()

hasNextChunk

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

nextChunk

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

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)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
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

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