Package org.jboss.resteasy.util
Class CommitHeaderOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.jboss.resteasy.util.CommitHeaderOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Direct Known Subclasses:
GZIPEncodingInterceptor.CommittedGZIPOutputStream
public class CommitHeaderOutputStream extends OutputStream
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CommitHeaderOutputStream.CommitCallback
-
Field Summary
Fields Modifier and Type Field Description protected OutputStream
delegate
protected CommitHeaderOutputStream.CommitCallback
headers
protected boolean
isHeadersCommitted
-
Constructor Summary
Constructors Constructor Description CommitHeaderOutputStream()
CommitHeaderOutputStream(OutputStream delegate, CommitHeaderOutputStream.CommitCallback headers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
commit()
void
flush()
OutputStream
getDelegate()
void
setDelegate(OutputStream delegate)
void
setHeaders(CommitHeaderOutputStream.CommitCallback headers)
void
write(byte[] bytes)
void
write(byte[] bytes, int i, int i1)
void
write(int i)
-
-
-
Field Detail
-
delegate
protected OutputStream delegate
-
isHeadersCommitted
protected boolean isHeadersCommitted
-
headers
protected CommitHeaderOutputStream.CommitCallback headers
-
-
Constructor Detail
-
CommitHeaderOutputStream
public CommitHeaderOutputStream(OutputStream delegate, CommitHeaderOutputStream.CommitCallback headers)
-
CommitHeaderOutputStream
public CommitHeaderOutputStream()
-
-
Method Detail
-
getDelegate
public OutputStream getDelegate()
-
setDelegate
public void setDelegate(OutputStream delegate)
-
setHeaders
public void setHeaders(CommitHeaderOutputStream.CommitCallback headers)
-
commit
public void commit()
-
write
public void write(int i) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] bytes) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] bytes, int i, int i1) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
-