public class FLACFileOutputStream extends java.lang.Object implements FLACOutputStream, java.io.Closeable
Constructor and Description |
---|
FLACFileOutputStream(java.io.File file) |
FLACFileOutputStream(java.io.FileOutputStream fos)
Constructor.
|
FLACFileOutputStream(java.lang.String filename)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canSeek()
Test whether this stream is seekable.
|
void |
close()
Close FileOutputStream owned by this object.
|
long |
getPos()
Get the current write position of this stream.
|
boolean |
isValid()
Deprecated.
|
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 in length!
This takes into account seeking to different portions.
|
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 FLACFileOutputStream(java.lang.String filename) throws java.io.IOException
filename
- file to connect to output stream.java.io.IOException
public FLACFileOutputStream(java.io.File file) throws java.io.IOException
java.io.IOException
public FLACFileOutputStream(java.io.FileOutputStream fos) throws java.io.IOException
fos
- FileOutputStream to write to, must be open. Current position
of fos will be used as this object's position.java.io.IOException
@Deprecated public boolean isValid()
public long seek(long pos) throws java.io.IOException
seek
in interface FLACOutputStream
pos
- target position to seek to.java.io.IOException
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