|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
org.apache.commons.io.output.LockableFileWriter
public class LockableFileWriter
FileWriter that will create and honor lock files to allow simple
cross thread file lock handling. If Writer attributes
are unspecified, the default behavior is to overwrite (rather than
to append), and to use the value of the system property
java.io.tmpdir for the lock file directory.
| Field Summary |
|---|
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
LockableFileWriter(File file)
Constructs a LockableFileWriter. |
|
LockableFileWriter(File file,
boolean append)
Constructs a LockableFileWriter. |
|
LockableFileWriter(File file,
boolean append,
String lockDir)
Constructs a LockableFileWriter. |
|
LockableFileWriter(String fileName)
Constructs a LockableFileWriter. |
|
LockableFileWriter(String fileName,
boolean append)
Constructs a LockableFileWriter. |
|
LockableFileWriter(String fileName,
boolean append,
String lockDir)
Constructs a LockableFileWriter. |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
flush()
|
void |
write(char[] cbuf,
int off,
int len)
|
| Methods inherited from class java.io.Writer |
|---|
append, append, append, write, write, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LockableFileWriter(String fileName)
throws IOException
fileName - file to write to
IOException - in case of an I/O errorpublic LockableFileWriter(String fileName,
boolean append)
throws IOException
fileName - file to write toappend - true if content should be appended (default is to overwrite).
IOException - in case of an I/O errorpublic LockableFileWriter(String fileName,
boolean append,
String lockDir)
throws IOException
fileName - file to write toappend - true if content should be appended (default is to overwrite).lockDir - Specifies the directory in which the lock file should be held.
IOException - in case of an I/O errorpublic LockableFileWriter(File file)
throws IOException
file - file to write to
IOException - in case of an I/O errorpublic LockableFileWriter(File file,
boolean append)
throws IOException
file - file to write toappend - true if content should be appended (default is to overwrite).
IOException - in case of an I/O errorpublic LockableFileWriter(File file,
boolean append,
String lockDir)
throws IOException
file - file to write toappend - true if content should be appended (default is to overwrite).lockDir - Specifies the directory in which the lock file should be held.
IOException - in case of an I/O error| Method Detail |
|---|
public void close()
throws IOException
close in interface Closeableclose in class WriterIOExceptionWriter.close()public void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOExceptionWriter.write(char[], int, int)public void flush()
throws IOException
flush in interface Flushableflush in class WriterIOExceptionWriter.flush()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||