public class FLACFileOutputStream extends Object implements FLACOutputStream, Closeable
| Constructor and Description |
|---|
FLACFileOutputStream(File file) |
FLACFileOutputStream(FileOutputStream fos)
Constructor.
|
FLACFileOutputStream(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(String filename) throws IOException
filename - file to connect to output stream.IOExceptionpublic FLACFileOutputStream(File file) throws IOException
IOExceptionpublic FLACFileOutputStream(FileOutputStream fos) throws IOException
fos - FileOutputStream to write to, must be open. Current position
of fos will be used as this object's position.IOException@Deprecated public boolean isValid()
public long seek(long pos)
throws IOException
seek in interface FLACOutputStreampos - target position to seek to.IOExceptionpublic void write(byte data)
throws IOException
write in interface FLACOutputStreamdata - byte to write.IOException - IOException will be raised if an error occurred while
writing.public int write(byte[] data,
int offset,
int count)
throws IOException
write in interface FLACOutputStreamdata - array containing bytes to be written.offset - start index of array to begin reading from.count - number of bytes to write.IOException - IOException upon a write error.public long size()
size in interface FLACOutputStreampublic boolean canSeek()
canSeek in interface FLACOutputStreampublic long getPos()
getPos in interface FLACOutputStreampublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface FLACOutputStreamIOExceptionCopyright © 2017. All rights reserved.