Package org.kohsuke.stapler.framework.io
Class AtomicFileWriter
java.lang.Object
java.io.Writer
org.kohsuke.stapler.framework.io.AtomicFileWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
Buffered
FileWriter
that uses UTF-8.
The write operation is atomic when used for overwriting; it either leaves the original file intact, or it completely rewrites it with new contents.
- Author:
- Kohsuke Kawaguchi
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
AtomicFileWriter
- Throws:
IOException
-
-
Method Details
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Specified by:
write
in classWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
commit
- Throws:
IOException
-
getTemporaryFile
Until the data is committed, this file captures the written content.
-