public class AudioStream
extends java.io.OutputStream
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this stream.
|
void |
finalize()
Finalizes the object.
|
void |
flush()
Flushes this stream.
|
void |
write(byte[] buffer)
Equivalent to
write(buffer, 0, buffer.length) . |
void |
write(byte[] buffer,
int offset,
int length)
Writes to the audio stream.
|
void |
write(int oneByte)
Writes to the audio stream.
|
void |
writeAudioFormat(short encodingFormat,
int averageBytesPerSecond,
short bitsPerSample,
short blockAlign,
short channelCount,
int samplesPerSecond,
byte[] formatSpecificData) |
public void writeAudioFormat(short encodingFormat, int averageBytesPerSecond, short bitsPerSample, short blockAlign, short channelCount, int samplesPerSecond, byte[] formatSpecificData)
public void write(byte[] buffer, int offset, int length) throws java.io.IOException
write
in class java.io.OutputStream
buffer
- containing the audio to be written.length
- Number of bytes in the buffer to be written.offset
- in buffer where to write from.java.lang.RuntimeException
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
- if an error occurs while flushing this stream.public void write(byte[] buffer) throws java.io.IOException
write(buffer, 0, buffer.length)
.write
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
public void write(int oneByte) throws java.lang.UnsupportedOperationException
write
in class java.io.OutputStream
java.lang.UnsupportedOperationException
public void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable