com.neoworks.mpeg
Class MPEGStream

java.lang.Object
  |
  +--com.neoworks.mpeg.MPEGStream

public final class MPEGStream
extends java.lang.Object

This class parses an MPEG audio bitstream and represents the resulting MPEG data "file".

Author:
Nigel Atkinson (nigel@neoworks.com)
, micah

Constructor Summary
MPEGStream(java.io.InputStream in)
          Public constructor
 
Method Summary
 void close()
          Close the source stream
 long getPlayingTime()
          Get the playing time in milliseconds for this MPEG Stream
 MPEGFrame readFrame()
          Reads and parses the next frame from the input source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MPEGStream

public MPEGStream(java.io.InputStream in)
Public constructor

Parameters:
in - The InputStream to read data from
Method Detail

getPlayingTime

public long getPlayingTime()
Get the playing time in milliseconds for this MPEG Stream

Returns:
The playing time in milliseconds

readFrame

public MPEGFrame readFrame()
                    throws java.io.IOException
Reads and parses the next frame from the input source.

Returns:
the Header describing details of the frame read, or null if the end of the stream has been reached.
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Close the source stream

Throws:
java.io.IOException