public class ClientCommandResponse extends java.lang.Object implements HttpResponseWrapper
Constructor and Description |
---|
ClientCommandResponse(int statusCode,
byte[] content,
java.lang.String contentType)
Used for storing Service Proxy based response
|
ClientCommandResponse(int statusCode,
java.lang.String content,
java.lang.String contentType)
Used for storing error response
|
ClientCommandResponse(com.indexdata.masterkey.pazpar2.client.Pazpar2HttpResponse pz2response,
java.io.ByteArrayOutputStream content)
Used for storing Pazpar2 based response
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes() |
java.lang.String |
getContentType() |
java.lang.String |
getResponseString()
Gets the response as a String - unless the response is marked as binary
|
byte[] |
getResponseToParse()
Used by the parser to get the response for further processing.
|
int |
getStatusCode() |
boolean |
isBinary() |
void |
setResponseToParse(java.lang.String parseString)
Overrides the original response with a modified response.
|
public ClientCommandResponse(com.indexdata.masterkey.pazpar2.client.Pazpar2HttpResponse pz2response, java.io.ByteArrayOutputStream content)
pz2response
- content
- public ClientCommandResponse(int statusCode, java.lang.String content, java.lang.String contentType)
statusCode
- content
- contentType
- public ClientCommandResponse(int statusCode, byte[] content, java.lang.String contentType)
statusCode
- content
- contentType
- public int getStatusCode()
getStatusCode
in interface HttpResponseWrapper
public java.lang.String getContentType()
getContentType
in interface HttpResponseWrapper
public java.lang.String getResponseString()
getResponseString
in interface HttpResponseWrapper
public byte[] getBytes()
getBytes
in interface HttpResponseWrapper
public void setResponseToParse(java.lang.String parseString)
parseString
- public byte[] getResponseToParse()
public boolean isBinary()
isBinary
in interface HttpResponseWrapper