|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileOutputStream(File f)
f
- the file this stream writes topublic FileOutputStream(File f, boolean append)
f
- the file this stream writes toappend
- if true this stream will start writing at the end of the file, otherwise at the beginningMethod Detail |
---|
public void write(int b) throws IOException
write
in class OutputStream
b
- 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
OutputStream
flush
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 OutputStream
IOException
- if an I/O error occurs.public void close() throws IOException
close
in class OutputStream
IOException
- if an I/O error occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |