|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
org.eclipse.osgi.framework.internal.reliablefile.ReliableFileOutputStream
public class ReliableFileOutputStream
A ReliableFile FileOutputStream replacement class. This class can be used just like FileOutputStream. The class is in partnership with ReliableFileInputStream to avoid losing file data by using multiple files.
ReliableFileInputStream| Field Summary |
|---|
| Fields inherited from class java.io.FilterOutputStream |
|---|
out |
| Constructor Summary | |
|---|---|
ReliableFileOutputStream(java.io.File file)
Constructs a new ReliableFileOutputStream on the File file. |
|
ReliableFileOutputStream(java.io.File file,
boolean append)
Constructs a new ReliableFileOutputStream on the File file. |
|
ReliableFileOutputStream(java.lang.String name)
Constructs a new ReliableFileOutputStream on the file named name. |
|
ReliableFileOutputStream(java.lang.String name,
boolean append)
Constructs a new ReliableFileOutputStream on the file named name. |
|
| Method Summary | |
|---|---|
void |
abort()
|
void |
close()
Closes this output stream and releases any system resources associated with this stream. |
java.io.File |
closeIntermediateFile()
|
void |
write(byte[] b)
Override default FilterOutputStream method. |
void |
write(byte[] b,
int off,
int len)
Override default FilterOutputStream method. |
void |
write(int b)
Override default FilterOutputStream method. |
| Methods inherited from class java.io.FilterOutputStream |
|---|
flush |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReliableFileOutputStream(java.io.File file)
throws java.io.IOException
file. If the
file exists, it is written over. See the constructor which can append to
the file if so desired.
file - the File on which to stream reads.
java.io.IOException - If an error occurs opening the file.
public ReliableFileOutputStream(java.io.File file,
boolean append)
throws java.io.IOException
file.
file - the File on which to stream reads.append - a boolean indicating whether or not to append to an existing file.
java.io.IOException - If an error occurs opening the file.
public ReliableFileOutputStream(java.lang.String name)
throws java.io.IOException
name. If
the file exists, it is written over. See the constructor which can append to
the file if so desired.
The name may be absolute or relative
to the System property "user.dir".
name - the file on which to stream writes.
java.io.IOException - If an error occurs opening the file.
public ReliableFileOutputStream(java.lang.String name,
boolean append)
throws java.io.IOException
name.
The name may be absolute or relative
to the System property "user.dir".
name - the file on which to stream writes.append - a boolean indicating whether or not to append to an existing file.
java.io.IOException - If an error occurs opening the file.| Method Detail |
|---|
public void close()
throws java.io.IOException
close
is that it closes the output stream. A closed stream cannot perform
output operations and cannot be reopened.
close in interface java.io.Closeableclose in class java.io.FilterOutputStreamjava.io.IOException - If an error occurs closing the file.
public java.io.File closeIntermediateFile()
throws java.io.IOException
java.io.IOException
public void write(byte[] b)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionFilterOutputStream.write(byte[])
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionFilterOutputStream.write(byte[], int, int)
public void write(int b)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionFilterOutputStream.write(int)public void abort()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||