|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
java.io.FileOutputStream
public class FileOutputStream
Writes a stream of bytes to a file.
| Constructor Summary | |
|---|---|
FileOutputStream(File f)
create a new OutputStream to write to this file, starting at the beginning of the file. |
|
FileOutputStream(File f,
boolean append)
create a new OutputStream to write to this file |
|
| Method Summary | |
|---|---|
void |
close()
Write the buffer to flash memory and update the file parameters in flash. |
void |
flush()
Flushes this output stream and forces any buffered output bytes to be written out. |
void |
write(int b)
write 1 byte to the file; if necessary, file will be moved become the last file in memory |
| Methods inherited from class java.io.OutputStream |
|---|
write, write |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
| Constructor Detail |
|---|
public FileOutputStream(File f)
f - the file this stream writes to
public FileOutputStream(File f,
boolean append)
f - the file this stream writes toappend - if true this sream will start writing at the end of the file, otherwise at the beginning| Method Detail |
|---|
public void write(int b)
throws IOException
write in class OutputStreamb - the byte.
IOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
output stream has been closed.
public void flush()
throws IOException
OutputStreamflush is
that calling it is an indication that, if any bytes previously
written have been buffered by the implementation of the output
stream, such bytes should immediately be written to their
intended destination.
The flush method of OutputStream does nothing.
flush in class OutputStreamIOException - if an I/O error occurs.
public void close()
throws IOException
close in class OutputStreamIOException - if an I/O error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||