Methods Summary |
---|
public java.lang.Object | clone()Copies the cirrent instance.
ContentLengthHeader retval = new ContentLengthHeader();
if (contentLength != null) {
retval.contentLength =
new Integer(contentLength.intValue());
}
return retval;
|
public java.lang.String | encodeBody()Encodes into a canonical string.
if (contentLength == null)
return "0";
else
return contentLength.toString();
|
public int | getContentLength()Gets the content length header field.
return contentLength.intValue();
|
public java.lang.Object | getValue()Gets the content length header value.
return this.contentLength;
|
public void | setContentLength(int contentLength)Sets the content length member.
if (contentLength < 0)
throw new IllegalArgumentException("parameter is <0");
this.contentLength = new Integer(contentLength);
this.headerValue = String.valueOf(contentLength);
|
public void | setHeaderValue(java.lang.String value)Sets the header value field.
int val;
try {
val = Integer.parseInt(value);
setContentLength(val);
} catch (IllegalArgumentException iae) {
throw iae;
}
|