com.jme3.audio.plugins
Class CachedOggStream

java.lang.Object
  extended by com.jme3.audio.plugins.CachedOggStream
All Implemented Interfaces:
de.jarnbjo.ogg.PhysicalOggStream

public class CachedOggStream
extends java.lang.Object
implements de.jarnbjo.ogg.PhysicalOggStream

Implementation of the PhysicalOggStream interface for reading and caching an Ogg stream from a URL. This class reads the data as fast as possible from the URL, caches it locally either in memory or on disk, and supports seeking within the available data.


Constructor Summary
CachedOggStream(java.io.InputStream in)
           
 
Method Summary
 void close()
           
 de.jarnbjo.ogg.OggPage getLastOggPage()
           
 java.util.Collection<de.jarnbjo.ogg.LogicalOggStream> getLogicalStreams()
           
 de.jarnbjo.ogg.OggPage getOggPage(int index)
           
 boolean isOpen()
           
 boolean isSeekable()
           
 void setTime(long granulePosition)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedOggStream

public CachedOggStream(java.io.InputStream in)
                throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getLastOggPage

public de.jarnbjo.ogg.OggPage getLastOggPage()

getLogicalStreams

public java.util.Collection<de.jarnbjo.ogg.LogicalOggStream> getLogicalStreams()
Specified by:
getLogicalStreams in interface de.jarnbjo.ogg.PhysicalOggStream

isOpen

public boolean isOpen()
Specified by:
isOpen in interface de.jarnbjo.ogg.PhysicalOggStream

close

public void close()
           throws java.io.IOException
Specified by:
close in interface de.jarnbjo.ogg.PhysicalOggStream
Throws:
java.io.IOException

getOggPage

public de.jarnbjo.ogg.OggPage getOggPage(int index)
                                  throws java.io.IOException
Specified by:
getOggPage in interface de.jarnbjo.ogg.PhysicalOggStream
Throws:
java.io.IOException

setTime

public void setTime(long granulePosition)
             throws java.io.IOException
Specified by:
setTime in interface de.jarnbjo.ogg.PhysicalOggStream
Throws:
java.io.IOException

isSeekable

public boolean isSeekable()
Specified by:
isSeekable in interface de.jarnbjo.ogg.PhysicalOggStream