|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectorg.xlightweb.Part
org.xlightweb.HttpRequest
org.xlightweb.PutRequest
public class PutRequest
PUT request
| Field Summary |
|---|
| Fields inherited from interface org.xlightweb.IHttpMessage |
|---|
CONNECT_METHOD, DEFAULT_ENCODING, DEFAULT_ENCODING_KEY, DELETE_METHOD, GET_METHOD, HEAD_METHOD, OPTIONS_METHOD, POST_METHOD, PUT_METHOD, TRACE_METHOD |
| Constructor Summary | |
|---|---|
PutRequest(String url)
constructor |
|
PutRequest(String url,
File file)
constructor |
|
PutRequest(String url,
File file,
boolean compress)
constructor |
|
PutRequest(String url,
NameValuePair... formParameters)
constructor |
|
PutRequest(String url,
String contentType)
constructor |
|
PutRequest(String url,
String[] formParameters)
constructor |
|
PutRequest(String url,
String contentType,
byte[] body)
constructor |
|
PutRequest(String url,
String contentType,
byte[] body,
boolean compress)
constructor |
|
PutRequest(String url,
String contentType,
ByteBuffer[] body)
constructor |
|
PutRequest(String url,
String contentType,
ByteBuffer[] body,
boolean compress)
constructor |
|
PutRequest(String url,
String contentType,
String body)
constructor |
|
PutRequest(String url,
String contentType,
String body,
boolean compress)
constructor |
|
PutRequest(String url,
String contentType,
String encoding,
String body)
constructor |
|
PutRequest(String url,
String contentType,
String encoding,
String body,
boolean compress)
constructor |
|
| Method Summary | |
|---|---|
Object |
getAttribute(String name)
Returns the value of the named attribute as an Object,
or null if no attribute of the given name exists. |
Enumeration |
getAttributeNames()
Returns an Enumeration containing the
names of the attributes available to this message. |
Set<String> |
getAttributeNameSet()
Returns an Set containing the
names of the attributes available to this messaget. |
int |
getContentLength()
Returns the length, in bytes, of the message body and made available by the input stream, or -1 if the length is not known. |
IHttpMessageHeader |
getMessageHeader()
returns the message header |
void |
removeHopByHopHeaders()
removes all hop-by-hop headers without Transfer-Encoding if set to chunked |
void |
setAttribute(String name,
Object o)
Stores an attribute in this header. |
void |
setContentLength(int length)
sets the content length in bytes |
| Methods inherited from class org.xlightweb.Part |
|---|
addHeader, addHeaderLine, addHeaderlines, containsHeader, getBlockingBody, getBody, getCharacterEncoding, getContentType, getDisposition, getDispositionParam, getDispositionType, getHeader, getHeader, getHeaderList, getHeaderNames, getHeaderNameSet, getHeaders, getNonBlockingBody, getPartHeader, getTransferEncoding, hasBody, removeHeader, setContentType, setHeader, setTransferEncoding, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xlightweb.IHttpMessage |
|---|
getAttribute, getAttributeNames, getAttributeNameSet, getCharacterEncoding, getContentLength, getContentType, getMessageHeader, getTransferEncoding, removeHopByHopHeaders, setAttribute, setContentLength, setContentType, setTransferEncoding |
| Methods inherited from interface org.xlightweb.IPart |
|---|
getBlockingBody, getBody, getNonBlockingBody, getPartHeader, hasBody |
| Methods inherited from interface org.xlightweb.IHeader |
|---|
addHeader, addHeaderLine, addHeaderlines, containsHeader, getDisposition, getDispositionParam, getDispositionType, getHeader, getHeader, getHeaderList, getHeaderNames, getHeaderNameSet, getHeaders, removeHeader, setHeader |
| Constructor Detail |
|---|
public PutRequest(String url)
throws MalformedURLException
url - the url string
MalformedURLException - if the url is malformed
public PutRequest(String url,
String contentType)
throws IOException,
MalformedURLException
url - the url stringcontentType - the content type
MalformedURLException - if the url is malformed
IOException - if an exception occurs
public PutRequest(String url,
File file)
throws IOException,
MalformedURLException
url - the url stringfile - the file
MalformedURLException - if the url is malformed
IOException - if an exception occurs
public PutRequest(String url,
File file,
boolean compress)
throws IOException,
MalformedURLException
url - the url stringfile - the filecompress - true, if the body should be compressed
MalformedURLException - if the url is malformed
IOException - if an exception occurs
public PutRequest(String url,
String contentType,
String body)
throws IOException,
MalformedURLException
url - the urlcontentType - the content typebody - the body
IOException
MalformedURLException
public PutRequest(String url,
String contentType,
String body,
boolean compress)
throws IOException,
MalformedURLException
url - the urlcontentType - the content typebody - the bodycompress - true, if the body should be compressed
IOException
MalformedURLException
public PutRequest(String url,
String contentType,
String encoding,
String body)
throws IOException,
MalformedURLException
url - the urlencoding - the encodingcontentType - the content typebody - the body
IOException
MalformedURLException
public PutRequest(String url,
String contentType,
String encoding,
String body,
boolean compress)
throws IOException,
MalformedURLException
url - the urlencoding - the encodingcontentType - the content typebody - the bodycompress - true, if the body should be compressed
IOException
MalformedURLException
public PutRequest(String url,
String contentType,
byte[] body)
throws IOException,
MalformedURLException
url - the urlcontentType - the content typebody - the body
IOException
MalformedURLException
public PutRequest(String url,
String contentType,
byte[] body,
boolean compress)
throws IOException,
MalformedURLException
url - the urlcontentType - the content typebody - the bodycompress - true, if the body should be compressed
IOException
MalformedURLException
public PutRequest(String url,
String contentType,
ByteBuffer[] body)
throws IOException,
MalformedURLException
url - the urlcontentType - the content typebody - the body
IOException
MalformedURLException
public PutRequest(String url,
String contentType,
ByteBuffer[] body,
boolean compress)
throws IOException,
MalformedURLException
url - the urlcontentType - the content typebody - the bodycompress - true, if the body should be compressed
IOException
MalformedURLException
public PutRequest(String url,
NameValuePair... formParameters)
throws IOException,
MalformedURLException
url - the urlformParameters - the FORM parameter
IOException
MalformedURLException
public PutRequest(String url,
String[] formParameters)
throws IOException,
MalformedURLException
url - the url stringformParameters - array of FORM parameters formatted as MalformedURLException - if the url is malformed
IOException - if an exception occurs| Method Detail |
|---|
public final IHttpMessageHeader getMessageHeader()
getMessageHeader in interface IHttpMessage
public final void setAttribute(String name,
Object o)
setAttribute in interface IHttpMessagename - a String specifying
the name of the attributeo - the Object to be storedpublic final Object getAttribute(String name)
Object,
or null if no attribute of the given name exists.
getAttribute in interface IHttpMessagename - a String specifying the name of the attribute
Object containing the value of the attribute,
or null if the attribute does not existpublic final Enumeration getAttributeNames()
Enumeration containing the
names of the attributes available to this message.
This method returns an empty Enumeration
if the message has no attributes available to it.
getAttributeNames in interface IHttpMessageEnumeration of strings containing the names
of the message's attributespublic final Set<String> getAttributeNameSet()
Set containing the
names of the attributes available to this messaget.
This method returns an empty Set
if the request has no attributes available to it.
getAttributeNameSet in interface IHttpMessageSet of strings
containing the names of the message's attributespublic final int getContentLength()
getContentLength in interface IHttpMessagepublic final void setContentLength(int length)
setContentLength in interface IHttpMessagelength - the content length in bytespublic final void removeHopByHopHeaders()
removeHopByHopHeaders in interface IHttpMessage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||