|
|||||||||||
| 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
FileOutputStream provides the functionality to write to files. This class inherits the write methods of class OutputStream.
| Constructor Summary | |
FileOutputStream(File f)
Creates a new FileOutputStream to write to the specified file. |
|
FileOutputStream(String name)
Creates a new FileOutputStream to write to the specified file. |
|
| Method Summary | |
void |
close()
Closes this stream and releases all system resources associated with it. |
void |
flush()
Flushes this output stream. |
void |
write(byte[] b,
int off,
int len)
Writes len bytes from b to this output stream starting at offset off. |
void |
write(int b)
Writes a single byte to this output stream. |
| Methods inherited from class java.io.OutputStream |
write |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, toString |
| Constructor Detail |
public FileOutputStream(String name)
name - Name of the file to write to.public FileOutputStream(File f)
| Method Detail |
public void write(int b)
throws IOException
write in class OutputStreamIOException - if an I/O error occures.
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamb - Array of bytes containing the data to be written.off - Offset into b where the data begins.len - Number of bytes to be written.
IOException - if an I/O error occures.
public void flush()
throws IOException
flush in class OutputStreamIOException
public void close()
throws IOException
close in class OutputStreamIOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||