com.atlassian.httpclient.apache.httpcomponents
Class DefaultResponse
java.lang.Object
com.atlassian.httpclient.apache.httpcomponents.DefaultResponse
- All Implemented Interfaces:
- Message, Response
public final class DefaultResponse
- extends Object
- implements Response
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultResponse
public DefaultResponse(Headers headers,
InputStream entityStream,
com.atlassian.fugue.Option<Long> maxEntitySize,
int statusCode,
String statusText)
builder
public static DefaultResponse.DefaultResponseBuilder builder()
getStatusCode
public int getStatusCode()
- Specified by:
getStatusCode in interface Response
getStatusText
public String getStatusText()
- Specified by:
getStatusText in interface Response
isInformational
public boolean isInformational()
- Specified by:
isInformational in interface Response
isSuccessful
public boolean isSuccessful()
- Specified by:
isSuccessful in interface Response
isOk
public boolean isOk()
- Specified by:
isOk in interface Response
isCreated
public boolean isCreated()
- Specified by:
isCreated in interface Response
isNoContent
public boolean isNoContent()
- Specified by:
isNoContent in interface Response
isRedirection
public boolean isRedirection()
- Specified by:
isRedirection in interface Response
isSeeOther
public boolean isSeeOther()
- Specified by:
isSeeOther in interface Response
isNotModified
public boolean isNotModified()
- Specified by:
isNotModified in interface Response
isClientError
public boolean isClientError()
- Specified by:
isClientError in interface Response
isBadRequest
public boolean isBadRequest()
- Specified by:
isBadRequest in interface Response
isUnauthorized
public boolean isUnauthorized()
- Specified by:
isUnauthorized in interface Response
isForbidden
public boolean isForbidden()
- Specified by:
isForbidden in interface Response
isNotFound
public boolean isNotFound()
- Specified by:
isNotFound in interface Response
isConflict
public boolean isConflict()
- Specified by:
isConflict in interface Response
isServerError
public boolean isServerError()
- Specified by:
isServerError in interface Response
isInternalServerError
public boolean isInternalServerError()
- Specified by:
isInternalServerError in interface Response
isServiceUnavailable
public boolean isServiceUnavailable()
- Specified by:
isServiceUnavailable in interface Response
isError
public boolean isError()
- Specified by:
isError in interface Response
isNotSuccessful
public boolean isNotSuccessful()
- Specified by:
isNotSuccessful in interface Response
getContentLength
public com.atlassian.fugue.Option<Long> getContentLength()
- Specified by:
getContentLength in interface Message
getContentType
public String getContentType()
- Specified by:
getContentType in interface Message
getContentCharset
public String getContentCharset()
- Specified by:
getContentCharset in interface Message
getAccept
public String getAccept()
getEntityStream
public InputStream getEntityStream()
throws IllegalStateException
- Specified by:
getEntityStream in interface Message
- Throws:
IllegalStateException
getEntity
public String getEntity()
throws IllegalStateException,
IllegalArgumentException
- Specified by:
getEntity in interface Message
- Throws:
IllegalStateException
IllegalArgumentException
hasEntity
public boolean hasEntity()
- Specified by:
hasEntity in interface Message
hasReadEntity
public boolean hasReadEntity()
- Specified by:
hasReadEntity in interface Message
getHeaders
public Map<String,String> getHeaders()
- Specified by:
getHeaders in interface Message
getHeader
public String getHeader(String name)
- Specified by:
getHeader in interface Message
validate
public Message validate()
Copyright © 2012–2015 Atlassian. All rights reserved.