Package ipsk.audio.io
Class InterceptorAudioInputStream
- java.lang.Object
-
- java.io.InputStream
-
- javax.sound.sampled.AudioInputStream
-
- ipsk.audio.io.InterceptorAudioInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class InterceptorAudioInputStream extends javax.sound.sampled.AudioInputStream
- Author:
- klausj
-
-
Constructor Summary
Constructors Constructor Description InterceptorAudioInputStream(java.io.InputStream stream, javax.sound.sampled.AudioFormat format, long length)
InterceptorAudioInputStream(javax.sound.sampled.AudioInputStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAudioOutputStream(IAudioOutputStream os)
int
available()
void
close()
javax.sound.sampled.AudioFormat
getFormat()
long
getFrameLength()
boolean
isInterrupted()
void
mark(int readlimit)
boolean
markSupported()
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
void
removeOutputStream(IAudioOutputStream os)
void
reset()
void
setInterrupted(boolean interrupted)
long
skip(long n)
-
-
-
Constructor Detail
-
InterceptorAudioInputStream
public InterceptorAudioInputStream(java.io.InputStream stream, javax.sound.sampled.AudioFormat format, long length)
- Parameters:
stream
-format
-length
-
-
InterceptorAudioInputStream
public InterceptorAudioInputStream(javax.sound.sampled.AudioInputStream stream)
-
-
Method Detail
-
available
public int available() throws java.io.IOException
- Overrides:
available
in classjavax.sound.sampled.AudioInputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjavax.sound.sampled.AudioInputStream
- Throws:
java.io.IOException
-
getFormat
public javax.sound.sampled.AudioFormat getFormat()
- Overrides:
getFormat
in classjavax.sound.sampled.AudioInputStream
-
getFrameLength
public long getFrameLength()
- Overrides:
getFrameLength
in classjavax.sound.sampled.AudioInputStream
-
mark
public void mark(int readlimit)
- Overrides:
mark
in classjavax.sound.sampled.AudioInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classjavax.sound.sampled.AudioInputStream
-
read
public int read() throws java.io.IOException
- Overrides:
read
in classjavax.sound.sampled.AudioInputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjavax.sound.sampled.AudioInputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException
- Overrides:
read
in classjavax.sound.sampled.AudioInputStream
- Throws:
java.io.IOException
-
reset
public void reset() throws java.io.IOException
- Overrides:
reset
in classjavax.sound.sampled.AudioInputStream
- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException
- Overrides:
skip
in classjavax.sound.sampled.AudioInputStream
- Throws:
java.io.IOException
-
addAudioOutputStream
public void addAudioOutputStream(IAudioOutputStream os) throws AudioFormatNotSupportedException
- Throws:
AudioFormatNotSupportedException
-
removeOutputStream
public void removeOutputStream(IAudioOutputStream os)
-
isInterrupted
public boolean isInterrupted()
-
setInterrupted
public void setInterrupted(boolean interrupted)
-
-