|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
java.io.BufferedOutputStream
org.apache.felix.mosgi.jmx.httpconnector.mx4j.tools.adaptor.http.HttpOutputStream
public class HttpOutputStream
HttpAdaptor sets the basic adaptor listening for HTTP requests
Field Summary | |
---|---|
protected int |
code
Answer code |
protected Map |
headers
Headers to be sent |
protected boolean |
sendHeaders
whether to send the headers |
Fields inherited from class java.io.BufferedOutputStream |
---|
buf, count |
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor Summary | |
---|---|
HttpOutputStream(OutputStream out,
HttpInputStream in)
Creates a new HttpOutputStream with a given OutputStream and an InputStream |
Method Summary | |
---|---|
boolean |
sendHeaders()
Sends the headers |
void |
setCode(int code)
Sets the answer code |
void |
setHeader(String attr,
String value)
Sets a given header code |
void |
write(InputStream in)
Writes the content of the input stream to the output stream |
void |
write(String msg)
Writes a given message line |
Methods inherited from class java.io.BufferedOutputStream |
---|
flush, write, write |
Methods inherited from class java.io.FilterOutputStream |
---|
close, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int code
protected boolean sendHeaders
protected Map headers
Constructor Detail |
---|
public HttpOutputStream(OutputStream out, HttpInputStream in)
out
- The OutputStream normally associated with the output socket
stream of the incoming connectionin
- HttpInputStream containing the incoming requestMethod Detail |
---|
public void setCode(int code)
code
- The new code valuepublic void setHeader(String attr, String value)
attr
- The new header namevalue
- The new header valuepublic boolean sendHeaders() throws IOException
IOException
- Description of Exceptionpublic void write(String msg) throws IOException
msg
- The message to be written
IOException
public void write(InputStream in) throws IOException
in
- The input stream
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |