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
- Enclosing class:
- Request
public static class Request.HttpOutputStream
- extends java.io.FilterOutputStream
The HttpOutputStream
provides the convenience method
writeBytes
for writing the byte representation of a
string, without bringing in the overhead and the deprecated warnings
associated with a java.io.DataOutputStream
.
The other methods in this class are here to allow the
FilterHandler
and ChainSawHandler
to
alter the behavior in an implementation specific way. This behavior
is unfortunate, and might go away when a better strategy comes along.
Field Summary |
int |
bytesWritten
Count the number of bytes that are written to this stream |
Fields inherited from class java.io.FilterOutputStream |
out |
Methods inherited from class java.io.FilterOutputStream |
close, flush, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bytesWritten
public int bytesWritten
- Count the number of bytes that are written to this stream
Request.HttpOutputStream
public Request.HttpOutputStream(java.io.OutputStream out)
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:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
sendHeaders
public void sendHeaders(Request request)
throws java.io.IOException
- Throws:
java.io.IOException