public abstract class FFNativePeerInputStream extends InputStream
Modifier and Type | Field and Description |
---|---|
protected ByteBuffer |
nativeBuffer
Buffer the native side copies audio data into.
|
protected long |
pointer
Pointer to the native peer struct.
|
Modifier | Constructor and Description |
---|---|
protected |
FFNativePeerInputStream()
Subclasses will open a native stream in this constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract void |
close(long pointer)
Closes the native peer and releases all resources held by it.
|
protected abstract void |
fillNativeBuffer()
Fills
nativeBuffer with new data. |
protected void |
finalize() |
protected boolean |
isOpen()
Indicates whether the underlying native peer is still available.
|
abstract boolean |
isSeekable() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
abstract void |
seek(long time,
TimeUnit timeUnit) |
available, mark, markSupported, read, reset, skip
protected long pointer
protected ByteBuffer nativeBuffer
protected FFNativePeerInputStream() throws IOException, UnsupportedAudioFileException
IOException
- if we cannot open the stream because of IO issues (e.g. not found).UnsupportedAudioFileException
- if we cannot open the stream, because the format is unsupportedpublic int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public abstract boolean isSeekable()
FFAudioInputStream.isSeekable()
public abstract void seek(long time, TimeUnit timeUnit) throws UnsupportedOperationException, IOException
time
- timetimeUnit
- time unitIOException
- if an IO error occursUnsupportedOperationException
FFAudioInputStream.seek(long, java.util.concurrent.TimeUnit)
protected boolean isOpen()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
protected abstract void fillNativeBuffer() throws IOException
nativeBuffer
with new data.IOException
- if an IO error occursprotected abstract void close(long pointer) throws IOException
pointer
- pointerIOException
- if an IO error occursCopyright © 2013–2023 tagtraum industries incorporated. All rights reserved.