Package ch.iterate.openstack.swift.model

Examples of ch.iterate.openstack.swift.model.ContainerMetadata


    public ContainerMetadata handleResponse(final HttpResponse response) throws ClientProtocolException, IOException {
        if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NO_CONTENT ||
                response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {

            ContainerMetadata metadata = new ContainerMetadata(
                    this.getContentType(response),
                    this.getContentLength(response),
                    this.getETag(response),
                    this.getLastModified(response));

            for(Header h : response.getAllHeaders()) {
                if(h.getName().startsWith(Constants.X_CONTAINER_META)
                        || Constants.HTTP_HEADER_EDITABLE_NAMES.contains(h.getName().toLowerCase(Locale.ENGLISH))) {
                    metadata.addMetaData(h.getName(), decode(h.getValue()));
                }
            }
            return metadata;
        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_FOUND) {
View Full Code Here


    public ContainerMetadata handleResponse(final HttpResponse response) throws ClientProtocolException, IOException {
        if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NO_CONTENT ||
                response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {

            ContainerMetadata metadata = new ContainerMetadata(
                    this.getContentType(response),
                    this.getContentLength(response),
                    this.getETag(response),
                    this.getLastModified(response));

            for(Header h : response.getAllHeaders()) {
                if(h.getName().startsWith(Constants.X_CONTAINER_META)
                        || Constants.HTTP_HEADER_EDITABLE_NAMES.contains(h.getName().toLowerCase(Locale.ENGLISH))) {
                    metadata.addMetaData(h.getName(), decode(h.getValue()));
                }
            }
            return metadata;
        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_FOUND) {
View Full Code Here

TOP

Related Classes of ch.iterate.openstack.swift.model.ContainerMetadata

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.