edu.neu.ccs.demeterf.http.classes
Class HTTPHead

java.lang.Object
  extended by edu.neu.ccs.demeterf.http.classes.HTTPHead
Direct Known Subclasses:
GetReq, HeadReq, PostReq

public abstract class HTTPHead
extends java.lang.Object

Representation of HTTPHead


Nested Class Summary
static class HTTPHead.url
          Field Class for HTTPHead.url
static class HTTPHead.ver
          Field Class for HTTPHead.ver
 
Constructor Summary
HTTPHead(URL url, HTTPVer ver)
          Construct a(n) HTTPHead Instance
 
Method Summary
static HTTPHead Get(URL url)
          Return a Get Request for the given URL
 HTTPReq.ReqType getType()
          Get the ReqType of this Request
abstract  URL getUrl()
          Getter for field HTTPHead.url
abstract  HTTPVer getVer()
          Getter for field HTTPHead.ver
 HTTPResp handle(HTTPReq r, ReqHandler h)
          Handle a Request using a ReHandler
static HTTPHead Head(URL url)
          Return a Head Request for the given URL
static HTTPHead parse(java.io.InputStream inpt)
          Parse an instance of HTTPHead from the given Stream
static HTTPHead parse(java.io.Reader inpt)
          Parse an instance of HTTPHead from the given Reader
static HTTPHead parse(java.lang.String inpt)
          Parse an instance of HTTPHead from the given String
static HTTPHead Post(URL url)
          Return a Post Request for the given URL
 java.lang.String toString()
          DGP method from Class PrintToString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTTPHead

public HTTPHead(URL url,
                HTTPVer ver)
Construct a(n) HTTPHead Instance

Method Detail

parse

public static HTTPHead parse(java.lang.String inpt)
                      throws ParseException
Parse an instance of HTTPHead from the given String

Throws:
ParseException

parse

public static HTTPHead parse(java.io.InputStream inpt)
                      throws ParseException
Parse an instance of HTTPHead from the given Stream

Throws:
ParseException

parse

public static HTTPHead parse(java.io.Reader inpt)
                      throws ParseException
Parse an instance of HTTPHead from the given Reader

Throws:
ParseException

getType

public HTTPReq.ReqType getType()
Get the ReqType of this Request


handle

public HTTPResp handle(HTTPReq r,
                       ReqHandler h)
Handle a Request using a ReHandler


Get

public static HTTPHead Get(URL url)
Return a Get Request for the given URL


Head

public static HTTPHead Head(URL url)
Return a Head Request for the given URL


Post

public static HTTPHead Post(URL url)
Return a Post Request for the given URL


toString

public java.lang.String toString()
DGP method from Class PrintToString

Overrides:
toString in class java.lang.Object

getVer

public abstract HTTPVer getVer()
Getter for field HTTPHead.ver


getUrl

public abstract URL getUrl()
Getter for field HTTPHead.url