Package net.sbbi.upnp
Class HttpResponse
- java.lang.Object
-
- net.sbbi.upnp.HttpResponse
-
public class HttpResponse extends Object
A class to parse an HTTP response message.- Version:
- 1.0
- Author:
- SuperBonBon
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHttpResponse(String rawHttpResponse)Constructor of the response, will try to parse the raw response data
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBody()StringgetHeader()StringgetHTTPFieldElement(String fieldName, String elementName)StringgetHTTPHeaderField(String fieldName)
-
-
-
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
-
-