public class UncloseableOutputStream extends OutputStream
Title:
Description:
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Constructor and Description |
|---|
UncloseableOutputStream(OutputStream stream)
Wraps an output stream with a wrapper that does not allow the underlying stream to be closed.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Captures the close request, and does NOT forward it to the underlying stream.
|
void |
flush()
Forwards the call to the underlying stream.
|
OutputStream |
getUnderlyingStream()
Gets the underlying stream.
|
void |
write(byte[] b)
Forwards the call to the underlying stream.
|
void |
write(byte[] b,
int off,
int len)
Forwards the call to the underlying stream.
|
void |
write(int b)
Forwards the call to the underlying stream.
|
public UncloseableOutputStream(OutputStream stream)
stream - the underlying stream to be protected from closing.public void close()
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreampublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic OutputStream getUnderlyingStream()
Copyright © 2019. All rights reserved.