Package sunlabs.brazil.server
Class Request.HttpOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- sunlabs.brazil.server.Request.HttpOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
- Enclosing class:
- Request
public static class Request.HttpOutputStream extends java.io.FilterOutputStreamTheHttpOutputStreamprovides the convenience methodwriteBytesfor writing the byte representation of a string, without bringing in the overhead and the deprecated warnings associated with ajava.io.DataOutputStream.The other methods in this class are here to allow the
FilterHandlerandChainSawHandlerto alter the behavior in an implementation specific way. This behavior is unfortunate, and might go away when a better strategy comes along.
-
-
Field Summary
Fields Modifier and Type Field Description intbytesWrittenCount the number of bytes that are written to this stream
-
Constructor Summary
Constructors Constructor Description HttpOutputStream(java.io.OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsendHeaders(Request request)voidwrite(byte b)voidwrite(byte[] buf, int off, int len)voidwriteBytes(java.lang.String s)
-
-
-
Method Detail
-
writeBytes
public void writeBytes(java.lang.String s) throws java.io.IOException- Throws:
java.io.IOException
-
write
public void write(byte b) throws java.io.IOException- Throws:
java.io.IOException
-
write
public void write(byte[] buf, int off, int len) throws java.io.IOException- Overrides:
writein classjava.io.FilterOutputStream- Throws:
java.io.IOException
-
sendHeaders
public void sendHeaders(Request request) throws java.io.IOException
- Throws:
java.io.IOException
-
-