net.sbbi.upnp
Class HttpResponse

java.lang.Object
  extended by net.sbbi.upnp.HttpResponse

public class HttpResponse
extends Object

A class to parse an HTTP response message.

Version:
1.0
Author:
SuperBonBon

Constructor Summary
protected HttpResponse(String rawHttpResponse)
          Constructor of the response, will try to parse the raw response data
 
Method Summary
 String getBody()
           
 String getHeader()
           
 String getHTTPFieldElement(String fieldName, String elementName)
           
 String getHTTPHeaderField(String fieldName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpResponse

protected HttpResponse(String rawHttpResponse)
                throws IllegalArgumentException
Constructor of the response, will try to parse the raw response data

Parameters:
rawHttpResponse - the raw response data
Throws:
IllegalArgumentException - if some error occurs during parsing
Method Detail

getHeader

public String getHeader()

getBody

public String getBody()

getHTTPFieldElement

public String getHTTPFieldElement(String fieldName,
                                  String elementName)
                           throws IllegalArgumentException
Throws:
IllegalArgumentException

getHTTPHeaderField

public String getHTTPHeaderField(String fieldName)
                          throws IllegalArgumentException
Throws:
IllegalArgumentException


Copyright © 2010. All Rights Reserved.