|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
artofillusion.SafeFileOutputStream
public class SafeFileOutputStream
| Field Summary | |
|---|---|
static int |
APPEND
|
static int |
CREATE
|
static int |
KEEP_BACKUP
optional modes |
static int |
OVERWRITE
Stream creation modes |
| Constructor Summary | |
|---|---|
SafeFileOutputStream(java.io.File file,
int mode)
Ctor Create a safe output stream on the specified file |
|
SafeFileOutputStream(java.lang.String path,
int mode)
Ctor Create a safe output stream on the named path |
|
| Method Summary | |
|---|---|
void |
abort()
abort the stream closes the underlying stream, frees all resources, and removes any temporary files. |
void |
close()
close the underlying stream, and complete the commit |
void |
open(java.io.File file,
int mode)
open the specified file |
void |
open(java.lang.String path,
int mode)
open the specified path |
void |
write(byte[] array)
write to the underlying stream |
void |
write(byte[] array,
int start,
int length)
write to the underlying stream |
void |
write(int value)
write to the underlying stream |
| Methods inherited from class java.io.FilterOutputStream |
|---|
flush |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int OVERWRITE
public static final int CREATE
public static final int APPEND
public static final int KEEP_BACKUP
| Constructor Detail |
|---|
public SafeFileOutputStream(java.lang.String path,
int mode)
throws java.io.IOException
path - string pathnamemode - the logical OR of the desired mode values
java.io.IOException
public SafeFileOutputStream(java.io.File file,
int mode)
throws java.io.IOException
file - - File to writemode - - logical OR of the desired mode values
java.io.IOException| Method Detail |
|---|
public void open(java.lang.String path,
int mode)
throws java.io.IOException
path - String pathname of the output filemode - logical OR of the desired mode values
java.io.IOException
public void open(java.io.File file,
int mode)
throws java.io.IOException
file - File to writemode - logical OR of the desired mode values
java.io.IOException
public void abort()
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.FilterOutputStreamjava.io.IOException
public void write(byte[] array)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOException
public void write(byte[] array,
int start,
int length)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOException
public void write(int value)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||