|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream java.io.FilterOutputStream java.io.BufferedOutputStream mx4j.tools.adaptor.http.HttpOutputStream
HttpAdaptor sets the basic adaptor listening for HTTP requests
Field Summary | |
protected int |
code
Answer code |
protected java.util.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(java.io.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(java.lang.String attr,
java.lang.String value)
Sets a given header code |
void |
write(java.io.InputStream in)
Writes the content of the input stream to the output stream |
void |
write(java.lang.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 java.util.Map headers
Constructor Detail |
public HttpOutputStream(java.io.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(java.lang.String attr, java.lang.String value)
attr
- The new header namevalue
- The new header valuepublic boolean sendHeaders() throws java.io.IOException
java.io.IOException
- Description of Exceptionpublic void write(java.lang.String msg) throws java.io.IOException
msg
- The message to be written
java.io.IOException
public void write(java.io.InputStream in) throws java.io.IOException
in
- The input stream
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |