|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
com.sun.xfile.XFileOutputStream
public class XFileOutputStream
An XFile output stream is an output stream for writing data to an
XFile.
| Constructor Summary | |
|---|---|
XFileOutputStream(java.lang.String name)
Creates an output XFile stream to write to the file with the specified name. |
|
XFileOutputStream(java.lang.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. |
|
| Method Summary | |
|---|---|
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(byte[] b)
Writes b.length bytes from the specified byte array
to this file output stream. |
void |
write(byte[] 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XFileOutputStream(XFile xfile)
throws java.io.IOException
XFile object.
file - the XFile to be opened for writing.
java.io.IOException - if the XFile could not
be opened for writing.
public XFileOutputStream(java.lang.String name)
throws java.io.IOException
name - the system-dependent filename.
java.io.IOException - if the file could
not be opened for writing.
public XFileOutputStream(XFile xfile,
boolean append)
throws java.io.IOException
xfile - the XFile to be opened for writing.append - true if writes begin at the end of the file
java.io.IOException - If the file is not found.
public XFileOutputStream(java.lang.String name,
boolean append)
throws java.io.IOException
name - the native name or URLappend - true if writes begin at the end of the file
java.io.IOException - If the file is not found.| Method Detail |
|---|
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - the byte to be written.
java.io.IOException - if an I/O error occurs.
public void write(byte[] b)
throws java.io.IOException
b.length bytes from the specified byte array
to this file output stream.
write in class java.io.OutputStreamb - the data.
java.io.IOException - if an I/O error occurs.
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
len bytes from the specified byte array
starting at offset off to this XFile output stream.
write in class java.io.OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.
java.io.IOException - if an I/O error occurs.
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs.
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs.
protected void finalize()
throws java.io.IOException
close method of this XFile
output stream is called when there are no more references
to this stream.
finalize in class java.lang.Objectjava.io.IOException - if an I/O error occurs.XFileInputStream.close()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||