Class prominence.io.AppendFileOutputStream
All Packages Class Hierarchy This Package Previous Next Index
Class prominence.io.AppendFileOutputStream
java.lang.Object
|
+----java.io.OutputStream
|
+----prominence.io.AppendFileOutputStream
- public class AppendFileOutputStream
- extends OutputStream
A FileOutputStream that appends data to the end of an
existing file.
- See Also:
- AltAppendFileOutputStream
-
file
- A RandomAccessFile used to provide file access.
-
AppendFileOutputStream(String)
- Creates a new AppendFileOutputStream that appends to the
end of an existing file, or creates a new file otherwise.
-
close()
- Closes the file.
-
write(int)
- Writes a byte to the open file.
file
protected RandomAccessFile file
- A RandomAccessFile used to provide file access.
AppendFileOutputStream
public AppendFileOutputStream(String fileName) throws IOException
- Creates a new AppendFileOutputStream that appends to the
end of an existing file, or creates a new file otherwise.
- Parameters:
- fileName - The name of the file to open
- Throws: IOException
- Occurs if the file could not be opened.
- Throws: SecurityException
- Occurs of the SecurityManager
denies the operation.
write
public void write(int b) throws IOException
- Writes a byte to the open file.
- Parameters:
- b - The byte to be written
- Overrides:
- write in class OutputStream
close
public void close() throws IOException
- Closes the file.
- Overrides:
- close in class OutputStream
All Packages Class Hierarchy This Package Previous Next Index