class ResponseImpl extends Response {

    @Override
    public URI getLocation() {
        Object value = getMetadata().getFirst(LOCATION);
        if (value == null) {
            return null;
        }
        if (value instanceof URI) {
            return (URI)value;
        }
        return URI.create(value instanceof String ? (String)value : getHeaderAsString(value));
    }

    protected  ResponseImpl(int status, Object entity, Annotation[] entityAnnotations, MultivaluedMap<String, Object> headers);

}