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. PreferRewindableFileOutputStreamOutputStreamthat 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 voidclose()Deprecated.voidflush()Deprecated.voidrewind()Deprecated.In addition to close, ensure that the next "open" would truncate the file.voidwrite(byte[] b)Deprecated.voidwrite(byte[] b, int off, int len)Deprecated.voidwrite(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 IOExceptionDeprecated.- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b) throws IOExceptionDeprecated.- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOExceptionDeprecated.- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOExceptionDeprecated.- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
public void close() throws IOExceptionDeprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
rewind
public void rewind() throws IOExceptionDeprecated.In addition to close, ensure that the next "open" would truncate the file.- Throws:
IOException
-
-