edu.cmu.sphinx.tools.audio
Class AudioDataInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by edu.cmu.sphinx.tools.audio.AudioDataInputStream
All Implemented Interfaces:
java.io.Closeable

public class AudioDataInputStream
extends java.io.InputStream

Converts an AudioData into an InputStream.


Constructor Summary
AudioDataInputStream(AudioData audio)
          Creates a new AudioDataInputStream for the given AudioData.
 
Method Summary
 int available()
           
 void close()
           
 void mark(int readLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] buf)
           
 int read(byte[] buf, int off, int len)
           
 void reset()
           
 long skip(int n)
           
 
Methods inherited from class java.io.InputStream
skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioDataInputStream

public AudioDataInputStream(AudioData audio)
Creates a new AudioDataInputStream for the given AudioData.

Parameters:
audio - the AudioData to turn into an AudioDataInputStream
Method Detail

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

read

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

skip

public long skip(int n)
          throws java.io.IOException
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Overrides:
available in class java.io.InputStream
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

mark

public void mark(int readLimit)
Overrides:
mark in class java.io.InputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.InputStream

reset

public void reset()
           throws java.io.IOException
Overrides:
reset in class java.io.InputStream
Throws:
java.io.IOException