public class SafeBufferedOutputStream extends BufferedOutputStream
Java's BufferedOutputStream swallows errors that occur when the output stream tries to write the final bytes to the output during close. This may result in corrupted files without notice.
buf, count
out
Constructor and Description |
---|
SafeBufferedOutputStream(OutputStream out) |
SafeBufferedOutputStream(OutputStream out,
int size) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
flush, write, write
write
public SafeBufferedOutputStream(OutputStream out)
out
- underlying output streamBufferedOutputStream.BufferedOutputStream(OutputStream)
public SafeBufferedOutputStream(OutputStream out, int size)
out
- underlying output streamsize
- buffer sizeBufferedOutputStream.BufferedOutputStream(OutputStream, int)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException
Copyright © 2015 Eclipse JGit Project. All rights reserved.