public final class Response extends Object
Constructor and Description |
---|
Response(Map<String,List<String>> headers,
byte[] content,
int statusCode) |
Modifier and Type | Method and Description |
---|---|
byte[] |
content() |
String |
contentUtf8() |
boolean |
exists()
Returns true if and only if status code is 2xx.
|
Optional<String> |
firstHeader(String name) |
Optional<Instant> |
firstHeaderFullDate(String name) |
Map<String,List<String>> |
headers() |
Map<String,List<String>> |
headersLowerCaseKey() |
boolean |
isOk() |
Metadata |
metadata()
Returns those headers that start with
x-amz-meta- (and removes that
prefix). |
Optional<String> |
metadata(String name) |
int |
statusCode() |
public Metadata metadata()
x-amz-meta-
(and removes that
prefix).x-amz-meta-
(and removes that prefix)public byte[] content()
public String contentUtf8()
public int statusCode()
public boolean isOk()
public boolean exists()
ServiceException
otherwise.ServiceException
- if status code other than 2xx or 404Copyright © 2021–2024. All rights reserved.