Package ch.iterate.openstack.swift.model

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


    public List<Container> handleResponse(final HttpResponse response) throws IOException {
        if(response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            final StringTokenizer tokenize = new StringTokenizer(EntityUtils.toString(response.getEntity()), "\n");
            final ArrayList<Container> containers = new ArrayList<Container>();
            while(tokenize.hasMoreTokens()) {
                containers.add(new Container(region, tokenize.nextToken()));
            }
            return containers;
        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NO_CONTENT) {
            return new ArrayList<Container>();
View Full Code Here


            final StrTokenizer tokenize = new StrTokenizer(EntityUtils.toString(response.getEntity()));
            tokenize.setDelimiterString("\n");
            final String[] containers = tokenize.getTokenArray();
            ArrayList<Container> list = new ArrayList<Container>();
            for(String container : containers) {
                list.add(new Container(region, container));
            }
            return list;
        }
        else if(response.getStatusLine().getStatusCode() == HttpStatus.SC_NO_CONTENT) {
            return new ArrayList<Container>();
View Full Code Here

TOP

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

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.