public interface FLACOutputStream
If canSeek() returns false: The file will be written as normal, but the headers will not be updated once the stream is closed. This means the FLAC file will not contain a count of the total number of samples, nor the MD5 hash of the original input(used for verifying the data).
If canSeek() returns true: Data will be written as it becomes available, and the encoder will seek() to a point near the beginning of the stream to fix the stream headers once the stream is closed.
Modifier and Type | Method and Description |
---|---|
boolean |
canSeek()
Test whether this object allows seeking.
|
long |
getPos()
Get current write position of this stream.
|
long |
seek(long pos)
Attempt to seek to the given position.
|
long |
size()
Get the number of bytes that have been written in length.
|
void |
write(byte data)
Write a single byte to the stream.
|
int |
write(byte[] data,
int offset,
int count)
Write the given number of bytes from a byte array.
|
long seek(long pos) throws java.io.IOException
pos
- target position.java.io.IOException
int write(byte[] data, int offset, int count) throws java.io.IOException
data
- array containing source bytes to writeoffset
- index of source array to begin reading from.count
- number of bytes to write.java.io.IOException
- IOException raised upon write error.long size()
void write(byte data) throws java.io.IOException
data
- byte to write.java.io.IOException
- IOException raised upon write error.boolean canSeek()
long getPos()