|
||||||||||
| 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(File file)
Constructs a new ReliableFileOutputStream on the File file. |
|
ReliableFileOutputStream(File file,
boolean append)
Constructs a new ReliableFileOutputStream on the File file. |
|
ReliableFileOutputStream(String name)
Constructs a new ReliableFileOutputStream on the file named name. |
|
ReliableFileOutputStream(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. |
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(File file)
throws 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.
IOException - If an error occurs opening the file.
public ReliableFileOutputStream(File file,
boolean append)
throws IOException
file.
file - the File on which to stream reads.append - a boolean indicating whether or not to append to an existing file.
IOException - If an error occurs opening the file.
public ReliableFileOutputStream(String name)
throws 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.
IOException - If an error occurs opening the file.
public ReliableFileOutputStream(String name,
boolean append)
throws 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.
IOException - If an error occurs opening the file.| Method Detail |
|---|
public void close()
throws IOException
close
is that it closes the output stream. A closed stream cannot perform
output operations and cannot be reopened.
close in interface Closeableclose in class FilterOutputStreamIOException - If an error occurs closing the file.
public File closeIntermediateFile()
throws IOException
IOException
public void write(byte[] b)
throws IOException
write in class FilterOutputStreamIOExceptionFilterOutputStream.write(byte[])
public void write(byte[] b,
int off,
int len)
throws IOException
write in class FilterOutputStreamIOExceptionFilterOutputStream.write(byte[], int, int)
public void write(int b)
throws IOException
write in class FilterOutputStreamIOExceptionFilterOutputStream.write(int)public void abort()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||