Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.anotherbigidea.flash.sound
Class ADPCMHelper.FramedInputStream  view ADPCMHelper.FramedInputStream download ADPCMHelper.FramedInputStream.java

java.lang.Object
  extended byjava.io.InputStream
      extended bycom.anotherbigidea.flash.sound.ADPCMHelper.FramedInputStream
All Implemented Interfaces:
java.io.Closeable
Enclosing class:
ADPCMHelper

public static class ADPCMHelper.FramedInputStream
extends java.io.InputStream

InputStream wrapper that ensures AudioInputStream is read on a frame-by-frame basis


Field Summary
protected  int dataPtr
           
protected  boolean done
           
protected  byte[] frameData
           
protected  int frameSize
           
protected  java.io.InputStream in
           
 
Constructor Summary
ADPCMHelper.FramedInputStream(java.io.InputStream in, int frameSize)
           
 
Method Summary
 int read()
          This method reads an unsigned byte from the input stream and returns it as an int in the range of 0-255.
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

protected java.io.InputStream in

frameData

protected byte[] frameData

dataPtr

protected int dataPtr

frameSize

protected int frameSize

done

protected boolean done
Constructor Detail

ADPCMHelper.FramedInputStream

public ADPCMHelper.FramedInputStream(java.io.InputStream in,
                                     int frameSize)
Method Detail

read

public int read()
         throws java.io.IOException
Description copied from class: java.io.InputStream
This method reads an unsigned byte from the input stream and returns it as an int in the range of 0-255. This method also will return -1 if the end of the stream has been reached.

This method will block until the byte can be read.