Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* #%L
* Apache Geronimo JAX-RS Spec 2.0
* %%
* Copyright (C) 2003 - 2014 The Apache Software Foundation
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package javax.ws.rs.core;
import javax.ws.rs.ext.RuntimeDelegate;
import java.lang.annotation.Annotation;
import java.net.URI;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
public abstract class Response {
protected Response() {
}
public abstract int getStatus();
public abstract StatusType getStatusInfo();
public abstract Object getEntity();
public abstract T readEntity(Class entityType);
public abstract T readEntity(GenericType entityType);
public abstract T readEntity(Class entityType, Annotation[] annotations);
public abstract T readEntity(GenericType entityType, Annotation[] annotations);
public abstract boolean hasEntity();
public abstract boolean bufferEntity();
public abstract void close();
public abstract MediaType getMediaType();
public abstract Locale getLanguage();
public abstract int getLength();
public abstract Set getAllowedMethods();
public abstract Map getCookies();
public abstract EntityTag getEntityTag();
public abstract Date getDate();
public abstract Date getLastModified();
public abstract URI getLocation();
public abstract Set getLinks();
public abstract boolean hasLink(String relation);
public abstract Link getLink(String relation);
public abstract Link.Builder getLinkBuilder(String relation);
public abstract MultivaluedMap getMetadata();
public MultivaluedMap getHeaders() {
return getMetadata();
}
public abstract MultivaluedMap getStringHeaders();
public abstract String getHeaderString(String name);
public static ResponseBuilder fromResponse(Response response) {
ResponseBuilder b = status(response.getStatus());
if (response.hasEntity()) {
b.entity(response.getEntity());
}
for (String headerName : response.getHeaders().keySet()) {
List