public class FLACStreamOutputStream extends java.lang.Object implements FLACOutputStream, java.io.Closeable
Constructor and Description |
---|
FLACStreamOutputStream(java.io.OutputStream out)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canSeek()
Test whether this stream is seekable.
|
void |
close()
Close OutputStream owned by this object.
|
long |
getPos()
Get the current write position of this stream.
|
long |
seek(long pos)
Attempt to seek to the given location within this stream.
|
long |
size()
Get the number of bytes that have been written by this object.
|
void |
write(byte data)
Write a byte to this stream.
|
int |
write(byte[] data,
int offset,
int count)
Write the given number of bytes from the byte array.
|
public FLACStreamOutputStream(java.io.OutputStream out) throws java.io.IOException
out
- OutputStream to write the FLAC stream to.java.io.IOException
public long seek(long pos)
seek
in interface FLACOutputStream
pos
- target position to seek to.public void write(byte data) throws java.io.IOException
write
in interface FLACOutputStream
data
- byte to write.java.io.IOException
- IOException will be raised if an error occurred while
writing.public int write(byte[] data, int offset, int count) throws java.io.IOException
write
in interface FLACOutputStream
data
- array containing bytes to be written.offset
- start index of array to begin reading from.count
- number of bytes to write.java.io.IOException
- IOException upon a write error.public long size()
size
in interface FLACOutputStream
public boolean canSeek()
canSeek
in interface FLACOutputStream
public long getPos()
getPos
in interface FLACOutputStream
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException