public abstract class StreamDecoder extends Object
InputStream.| Constructor and Description |
|---|
StreamDecoder() |
| Modifier and Type | Method and Description |
|---|---|
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. |
public static void registerExtension(String extension, Class<? extends StreamDecoder> clazz)
StreamDecoder for the specified file extension.public static StreamDecoder createInstance(File file) throws IOException
IOExceptionpublic static StreamDecoder createInstance(URL url) throws IOException
IOExceptionpublic 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
IOExceptionCopyright © 2015. All rights reserved.