com.sun.xfile
Class XFileOutputStream
OutputStream
com.sun.xfile.XFileOutputStream
public class XFileOutputStream
extends OutputStream
An XFile output stream is an output stream for writing data to an
XFile
.
XFileOutputStream(String name) - Creates an output XFile stream to write to the file with the
specified name.
|
XFileOutputStream(String name, boolean append) - Creates an output file with the specified name or URL.
|
XFileOutputStream(XFile xfile) - Creates an XFile output stream to write to the specified
XFile object.
|
XFileOutputStream(XFile xfile, boolean append) - Creates an output file for the specified XFile object.
|
void | close() - Closes this file output stream, flushes any buffered,
unwritten data, and releases any system resources
associated with this stream.
|
protected void | finalize() - Ensures that the
close method of this XFile
output stream is called when there are no more references
to this stream.
|
void | flush() - Flushes this output stream and forces any buffered output bytes
to be written out.
|
void | write(b[] ) - Writes
b.length bytes from the specified byte array
to this file output stream.
|
void | write(b[] , int off, int len) - Writes
len bytes from the specified byte array
starting at offset off to this XFile output stream.
|
void | write(int b) - Writes the specified byte to this file output stream.
|
XFileOutputStream
public XFileOutputStream(String name)
throws IOException
Creates an output XFile stream to write to the file with the
specified name.
name
- the system-dependent filename.
XFileOutputStream
public XFileOutputStream(String name,
boolean append)
throws IOException
Creates an output file with the specified name or URL.
name
- the native name or URLappend
- true if writes begin at the end of the file
XFileOutputStream
public XFileOutputStream(XFile xfile)
throws IOException
Creates an XFile output stream to write to the specified
XFile
object.
XFileOutputStream
public XFileOutputStream(XFile xfile,
boolean append)
throws IOException
Creates an output file for the specified XFile object.
xfile
- the XFile to be opened for writing.append
- true if writes begin at the end of the file
close
public void close()
throws IOException
Closes this file output stream, flushes any buffered,
unwritten data, and releases any system resources
associated with this stream.
After the file is closed further I/O operations may
throw IOException.
finalize
protected void finalize()
throws IOException
Ensures that the close
method of this XFile
output stream is called when there are no more references
to this stream.
flush
public void flush()
throws IOException
Flushes this output stream and forces any buffered output bytes
to be written out.
write
public void write(b[] )
throws IOException
Writes b.length
bytes from the specified byte array
to this file output stream.
write
public void write(b[] ,
int off,
int len)
throws IOException
Writes len
bytes from the specified byte array
starting at offset off
to this XFile output stream.
off
- the start offset in the data.len
- the number of bytes to write.
write
public void write(int b)
throws IOException
Writes the specified byte to this file output stream.
b
- the byte to be written.