|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.webdav.http.client.Message
public abstract class Message
A common superclass for HTTP messages. There are two kinds of HTTP message; requests and responses. They both have in common a context and an input stream. This class factors out these similarities.
Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Field Summary | |
---|---|
protected static BufferPool |
bufferPool
|
protected IContext |
context
|
protected boolean |
hasInputStream
|
protected boolean |
inputRead
|
protected InputStream |
is
|
Constructor Summary | |
---|---|
Message(IContext context,
InputStream is)
Creates a message. |
Method Summary | |
---|---|
void |
close()
Closes this message to free up any system resources. |
long |
getContentLength()
Returns the content length of this message's body, or -1 if the content length is unknown. |
IContext |
getContext()
Returns this message's context. |
InputStream |
getInputStream()
Returns this message's input stream. |
String |
toString()
|
void |
write(OutputStream os)
Writes this messages body to the given output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static BufferPool bufferPool
protected InputStream is
protected boolean inputRead
protected boolean hasInputStream
protected IContext context
Constructor Detail |
---|
public Message(IContext context, InputStream is)
context
- the message header, or null
for an empty
headeris
- an input stream containing the message's body, or
null
for an empty bodyMethod Detail |
---|
public void close() throws IOException
IOException
- if there is an I/O errorpublic long getContentLength()
public IContext getContext()
public InputStream getInputStream()
public String toString()
toString
in class Object
public void write(OutputStream os) throws IOException
os
- an output stream
IOException
- if there is an I/O error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |