Package hudson.util.io
Class RewindableFileOutputStream
java.lang.Object
java.io.OutputStream
hudson.util.io.RewindableFileOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
RewindableRotatingFileOutputStream
OutputStream
that writes to a file.
Allows the caller to rewind the stream and override previous content with fresh new data.
- Since:
- 2.18
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
out
-
-
Constructor Details
-
RewindableFileOutputStream
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
rewind
In addition to close, ensure that the next "open" would truncate the file.- Throws:
IOException
-