public abstract class AbstractCompressedServletOutputStream extends AbstractServletOutputStream
ServletOutputStream that knows whether it is closed or not| Constructor and Description |
|---|
AbstractCompressedServletOutputStream(javax.servlet.http.HttpServletRequest aHttpRequest,
javax.servlet.http.HttpServletResponse aHttpResponse,
String sContentEncoding,
long nContentLength,
int nMinCompressSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected abstract DeflaterOutputStream |
createDeflaterOutputStream(OutputStream aOS) |
void |
doCompress(String sDebugInfo) |
void |
doNotCompress(String sDebugInfo) |
void |
finishAndClose() |
void |
flush() |
OutputStream |
getOutputStream() |
boolean |
isClosed() |
void |
resetBuffer() |
void |
setContentLength(long nLength) |
void |
write(byte[] aBytes) |
void |
write(byte[] aBytes,
int nOfs,
int nLen) |
void |
write(int nByte) |
isReady, setWriteListenerpublic AbstractCompressedServletOutputStream(@Nonnull javax.servlet.http.HttpServletRequest aHttpRequest, @Nonnull javax.servlet.http.HttpServletResponse aHttpResponse, @Nonnull String sContentEncoding, long nContentLength, @Nonnegative int nMinCompressSize) throws IOException
IOExceptionpublic final void resetBuffer()
public final void setContentLength(long nLength)
@Nonnull protected abstract DeflaterOutputStream createDeflaterOutputStream(@Nonnull OutputStream aOS) throws IOException
IOExceptionpublic final void doCompress(@Nullable String sDebugInfo) throws IOException
IOExceptionpublic final void doNotCompress(String sDebugInfo) throws IOException
IOExceptionpublic final void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic final void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic final boolean isClosed()
public final void finishAndClose()
throws IOException
IOExceptionpublic final void write(int nByte)
throws IOException
write in class OutputStreamIOExceptionpublic final void write(@Nonnull byte[] aBytes) throws IOException
write in class OutputStreamIOExceptionpublic final void write(@Nonnull byte[] aBytes, @Nonnegative int nOfs, @Nonnegative int nLen) throws IOException
write in class OutputStreamIOException@Nullable public final OutputStream getOutputStream()
Copyright © 2016–2019 Philip Helger. All rights reserved.