public interface FedoraResponse
A wrapper for the HTTP response to a FedoraRequest
.
Request-specific FedoraResponse implementations should be generally
preferred as they provide convenience methods specific to the kind of
response. For example, GetNextPIDResponse
provides a convenience
method that parses the HTTP response an returns a List of the requested
pids.
Note that getEntity(Class)
and getEntityInputStream()
provide access to the underlying response entity, if desired. However, using
these methods and the convenience methods that parse the response entity are
mutually exclusive, as either will close the underlying InputStream once
accessed.
Implementations of FedoraResponse MUST throw a FedoraClientException if the HTTP status code of the response is >= 400.
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the response.
|
<T> T |
getEntity(Class<T> c)
Gets the raw response entity.
|
InputStream |
getEntityInputStream()
Gets the raw response entity.
|
int |
getStatus() |
String |
getType()
Get the media type of the response;
|
int getStatus()
InputStream getEntityInputStream()
Gets the raw response entity.
<T> T getEntity(Class<T> c)
Gets the raw response entity.
String getType()
Get the media type of the response;
void close()
Close the response.
The entity input stream is closed;
Copyright © 2010-2013 MediaShelf. All Rights Reserved.