|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.openal.StreamDecoder
public abstract class StreamDecoder
Decodes audio streams from data read from an InputStream.
| Field Summary | |
|---|---|
protected static HashMap<String,Class<? extends StreamDecoder>> |
_extensions
Maps file extensions to decoder classes. |
| Constructor Summary | |
|---|---|
StreamDecoder()
|
|
| Method Summary | |
|---|---|
static StreamDecoder |
createInstance(File file)
Creates and initializes a stream decoder for the specified file. |
static StreamDecoder |
createInstance(URL url)
Creates and initializes a stream decoder for the specified URL. |
abstract int |
getFormat()
Returns the sound format (see Stream.getFormat()). |
abstract int |
getFrequency()
Returns the sound frequency (see Stream.getFrequency()). |
abstract void |
init(InputStream in)
Initializes the decoder with its input stream. |
abstract int |
read(ByteBuffer buf)
Reads as much data as will fit into the specified buffer. |
static void |
registerExtension(String extension,
Class<? extends StreamDecoder> clazz)
Registers a class of StreamDecoder for the specified file extension. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static HashMap<String,Class<? extends StreamDecoder>> _extensions
| Constructor Detail |
|---|
public StreamDecoder()
| Method Detail |
|---|
public static void registerExtension(String extension,
Class<? extends StreamDecoder> clazz)
StreamDecoder for the specified file extension.
public static StreamDecoder createInstance(File file)
throws IOException
IOException
public static StreamDecoder createInstance(URL url)
throws IOException
IOException
public abstract void init(InputStream in)
throws IOException
IOExceptionpublic abstract int getFormat()
Stream.getFormat()).
public abstract int getFrequency()
Stream.getFrequency()).
public abstract int read(ByteBuffer buf)
throws IOException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||