public abstract class TAudioOutputStream extends Object implements AudioOutputStream
| Modifier | Constructor and Description |
|---|---|
protected |
TAudioOutputStream(AudioFormat audioFormat,
long lLength,
TDataOutputStream dataOutputStream,
boolean bDoBackPatching) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the stream.
|
long |
getCalculatedLength()
Gives number of bytes already written.
|
protected TDataOutputStream |
getDataOutputStream() |
AudioFormat |
getFormat()
Retrieves the AufioFormat of this AudioOutputStream.
|
long |
getLength()
Gives length of the stream.
|
protected void |
patchHeader() |
protected void |
requireEndianness(boolean bigEndian)
descendants should call this method if implicit endian conversion should
be done.
|
protected void |
requireSign8bit(boolean signed)
descendants should call this method if implicit sign conversion for 8-bit
data should be done
|
protected void |
setLengthFromCalculatedLength() |
int |
write(byte[] abData,
int nOffset,
int nLength)
Writes audio data to the destination (file or output stream).
|
protected abstract void |
writeHeader()
Writes the header of the audio file.
|
protected TAudioOutputStream(AudioFormat audioFormat, long lLength, TDataOutputStream dataOutputStream, boolean bDoBackPatching)
protected void requireSign8bit(boolean signed)
protected void requireEndianness(boolean bigEndian)
public AudioFormat getFormat()
AudioOutputStreamgetFormat in interface AudioOutputStreampublic long getLength()
getLength in interface AudioOutputStreampublic long getCalculatedLength()
protected TDataOutputStream getDataOutputStream()
public int write(byte[] abData,
int nOffset,
int nLength)
throws IOException
write in interface AudioOutputStreamIOExceptionprotected abstract void writeHeader()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface AudioOutputStreamIOExceptionprotected void patchHeader()
throws IOException
IOExceptionprotected void setLengthFromCalculatedLength()
Copyright © 2016. All Rights Reserved.