|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.universaldevices.soap.UDHTTPResponse
public class UDHTTPResponse
This class encapsulates an HTTP response as returned by ISY (or other servers).
The instances of this class are constructed
by UDHTTPRequest
objects and as such have no
development significance
Field Summary | |
---|---|
byte[] |
bbody
The body of the response (binary) |
java.lang.String |
body
The body of the response (localized String) |
int |
contentIndex
|
UDProxyDevice |
device
The UDProxyDevice from which this response is received |
static int |
INVALID_CONTENT_LENGTH
|
java.io.InputStream |
is
Input stream |
boolean |
opStat
Whether or not the request was successful |
java.io.OutputStream |
os
Output stream |
java.net.Socket |
s
The socket being used (which might have been kept open) |
java.lang.String |
sid
The subscription ID (UPnP specific) |
int |
status
The status of response; this is an HTTP status code |
Constructor Summary | |
---|---|
UDHTTPResponse(int status,
UDProxyDevice device)
Constructor |
|
UDHTTPResponse(java.lang.Object dev)
Constructor |
Method Summary | |
---|---|
java.lang.Object |
getBody()
Returns the body based on the content type |
int |
getContentLen()
|
java.io.InputStream |
getInputStream()
The input stream |
java.io.OutputStream |
getOutputStream()
The output stream |
java.net.Socket |
getSocket()
The socket |
boolean |
hasSucceeded()
Whether or not the request has succeeded |
static UDHTTPResponse |
parse(java.io.ByteArrayOutputStream data)
Parses the HTTP header |
static UDHTTPResponse |
parse(java.io.ByteArrayOutputStream data,
java.lang.Object device)
Parses the HTTP header |
void |
setContentLen(int newContentLen)
|
void |
setStatus(int status)
Sets the status for this object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int INVALID_CONTENT_LENGTH
public java.lang.String sid
public int status
public boolean opStat
public java.lang.String body
public byte[] bbody
public java.net.Socket s
public java.io.InputStream is
public java.io.OutputStream os
public UDProxyDevice device
UDProxyDevice
from which this response is received
public int contentIndex
Constructor Detail |
---|
public UDHTTPResponse(int status, UDProxyDevice device)
status
- - the status of the request (successful or not)device
- - the UDProxyDevice
from which this response is receivedUDProxyDevice
public UDHTTPResponse(java.lang.Object dev)
dev
- - the device from which this response is receivedUDProxyDevice
Method Detail |
---|
public boolean hasSucceeded()
hasSucceeded
in interface IUpdaterResponse
public java.net.Socket getSocket()
getSocket
in interface IUpdaterResponse
public java.io.InputStream getInputStream()
getInputStream
in interface IUpdaterResponse
public java.io.OutputStream getOutputStream()
getOutputStream
in interface IUpdaterResponse
public void setStatus(int status)
status
- - the statuspublic static UDHTTPResponse parse(java.io.ByteArrayOutputStream data)
data
- - the HTTP header
UDHTTPResponse
representing the responsepublic static UDHTTPResponse parse(java.io.ByteArrayOutputStream data, java.lang.Object device)
data
- - the response to be parseddevice
- - the device from which this response is received
UDHTTPResponse
representing the responsepublic java.lang.Object getBody()
public int getContentLen()
public void setContentLen(int newContentLen)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |