Package hudson.util.io
Class ReopenableFileOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- hudson.util.io.ReopenableFileOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
ReopenableRotatingFileOutputStream
@Deprecated public class ReopenableFileOutputStream extends OutputStream
Deprecated.due to risk for file leak. PreferRewindableFileOutputStream
OutputStream
that writes to a file.Unlike regular
FileOutputStream
, this implementation allows the caller to close, and then keep writing.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description ReopenableFileOutputStream(File out)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated.void
flush()
Deprecated.void
rewind()
Deprecated.In addition to close, ensure that the next "open" would truncate the file.void
write(byte[] b)
Deprecated.void
write(byte[] b, int off, int len)
Deprecated.void
write(int b)
Deprecated.-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Field Detail
-
out
protected final File out
Deprecated.
-
-
Constructor Detail
-
ReopenableFileOutputStream
public ReopenableFileOutputStream(File out)
Deprecated.
-
-
Method Detail
-
write
public void write(int b) throws IOException
Deprecated.- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b) throws IOException
Deprecated.- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException
Deprecated.- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
Deprecated.- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
Deprecated.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
rewind
public void rewind() throws IOException
Deprecated.In addition to close, ensure that the next "open" would truncate the file.- Throws:
IOException
-
-