Java.IO.FileOutputStream Class
An output stream that writes bytes to a file.

See Also: FileOutputStream Members


[Android.Runtime.Register("java/io/FileOutputStream", DoNotGenerateAcw=true)]
public class FileOutputStream : OutputStream


An output stream that writes bytes to a file. If the output file exists, it can be replaced or appended to. If it does not exist, a new file will be created.

java Example

File file = ...
   OutputStream out = null;
   try {
     out = new BufferedOutputStream(new FileOutputStream(file));
    finally {
     if (out != null) {

This stream is not buffered. Most callers should wrap this stream with a Java.IO.BufferedOutputStream.

Use Java.IO.FileWriter to write characters, as opposed to bytes, to a file.

See Also

[Android Documentation]


Namespace: Java.IO
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions:
Since: Added in API level 1