things.thinger.service.httptool
Class Head

java.lang.Object
  extended by things.thinger.service.httptool.Head

public class Head
extends java.lang.Object

The manage the head fields:
Content-Length
Content-MD5
ETag
Last-Modified

Version:
1.0

Version History

EPG - Initial - 16 NOV 07
 
Author:
Erich P. Gatejen

Constructor Summary
Head()
           
 
Method Summary
 void addHeadersToResult(ActionResult result)
          Add whichever headers are set to the result.
 java.lang.String renderFields()
          Render the fields as HTTP headers.
 void setContentLength(java.lang.String contentLength)
          Set the content length.
 void setEtag(java.lang.String etag)
          Set the ETag.
 void setLastModified(java.lang.String lastModified)
          Set the Last-Modified.
 void setMd5(java.lang.String md5)
          Set the MD3.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Head

public Head()
Method Detail

setContentLength

public void setContentLength(java.lang.String contentLength)
Set the content length. If unset or set as null, it will not be rendered.

Parameters:
contentLength - the value of the Content-Length field.

setMd5

public void setMd5(java.lang.String md5)
Set the MD3. If unset or set as null, it will not be rendered.

Parameters:
md5 - the value of the Content-MD5 field.

setEtag

public void setEtag(java.lang.String etag)
Set the ETag. If unset or set as null, it will not be rendered.

Parameters:
etag - the value of the ETag field.

setLastModified

public void setLastModified(java.lang.String lastModified)
Set the Last-Modified. If unset or set as null, it will not be rendered.

Parameters:
lastModified - the value of the Last-Modified field.

addHeadersToResult

public void addHeadersToResult(ActionResult result)
Add whichever headers are set to the result.

Parameters:
result - the result.

renderFields

public java.lang.String renderFields()
Render the fields as HTTP headers. Content-Length will always be rendered, even if just 0.

Returns:
the headers.


Things.