Package io.fusionauth.http.io
Class DelegatingOutputStream
java.lang.Object
java.io.OutputStream
io.fusionauth.http.io.DelegatingOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
A delegating output stream that can allow for latent configuration changes prior to writing to the underlying output stream.
- Author:
- Daniel DeGroff
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatingOutputStream(HTTPRequest request, HTTPResponse response, OutputStream outputStream, boolean compressByDefault) -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
DelegatingOutputStream
public DelegatingOutputStream(HTTPRequest request, HTTPResponse response, OutputStream outputStream, boolean compressByDefault)
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
isCompress
public boolean isCompress() -
setCompress
public void setCompress(boolean compress) -
willCompress
public boolean willCompress()- Returns:
- true if compression has been requested, and it appears as though we will compress because the requested content encoding is supported.
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-