Package com.emc.atmos.api

Examples of com.emc.atmos.api.BufferSegment


            updateMetadata(mMeta, metadata);
            request.setUserMetadata(metadata);
           
            return delegate.createObject(request);
        } else {
            request.setContent(new BufferSegment(buffer, 0, c));
        }
        CreateObjectResponse resp = delegate.createObject(request);
       
        pos = c;
       
        // Append until EOF.
        try {
            while((c = fillBuffer(buffer, in)) != -1) {
                UpdateObjectRequest uor = new UpdateObjectRequest();
                uor.setIdentifier(resp.getObjectId());
                uor.setContentType(request.getContentType());
                uor.setRange(new Range(pos, pos+c-1));
                uor.setContent(new BufferSegment(buffer, 0, c));
                pos += c;
                delegate.updateObject(uor);
            }
        } catch (IOException e) {
            throw new AtmosException("Error reading input data: " + e, e);
View Full Code Here


            updateMetadata(mMeta, metadata);
            request.setUserMetadata(metadata);
           
            return delegate.updateObject(request);
        } else {
            request.setContent(new BufferSegment(buffer, 0, c));
        }
        BasicResponse resp = delegate.updateObject(request);
       
        pos = c;
       
        // Append until EOF.
        try {
            while((c = fillBuffer(buffer, in)) != -1) {
                UpdateObjectRequest uor = new UpdateObjectRequest();
                uor.setIdentifier(request.getIdentifier());
                uor.setContentType(request.getContentType());
                uor.setRange(new Range(pos, pos+c-1));
                uor.setContent(new BufferSegment(buffer, 0, c));
                pos += c;
                delegate.updateObject(uor);
            }
        } catch (IOException e) {
            throw new AtmosException("Error reading input data: " + e, e);
View Full Code Here

TOP

Related Classes of com.emc.atmos.api.BufferSegment

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.