Examples of BufferSegment


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

Examples of com.emc.atmos.api.BufferSegment

            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

Examples of com.emc.esu.api.BufferSegment

     * @throws EsuException if the request fails.
     */
    public ObjectId createObject(Acl acl, MetadataList metadata, byte[] data,
            String mimeType) {
        return createObjectFromSegment(acl, metadata, data == null ? null
                : new BufferSegment(data), mimeType, null);
    }
View Full Code Here

Examples of com.emc.esu.api.BufferSegment

     * @throws EsuException if the request fails.
     */
    public ObjectId createObject(Acl acl, MetadataList metadata, byte[] data,
            String mimeType, Checksum checksum ) {
        return createObjectFromSegment(acl, metadata, data == null ? null
                : new BufferSegment(data), mimeType, checksum);
    }
View Full Code Here

Examples of com.emc.esu.api.BufferSegment

     * @throws EsuException if the request fails.
     */
    public ObjectId createObjectOnPath(ObjectPath path, Acl acl,
            MetadataList metadata, byte[] data, String mimeType) {
        return createObjectFromSegmentOnPath(path, acl, metadata,
                data == null ? null : new BufferSegment(data), mimeType, null);

    }
View Full Code Here

Examples of com.emc.esu.api.BufferSegment

     * @throws EsuException if the request fails.
     */
    public ObjectId createObjectOnPath(ObjectPath path, Acl acl,
            MetadataList metadata, byte[] data, String mimeType, Checksum checksum) {
        return createObjectFromSegmentOnPath(path, acl, metadata,
                data == null ? null : new BufferSegment(data), mimeType, checksum);

    }   
View Full Code Here

Examples of com.emc.esu.api.BufferSegment

     * @throws EsuException if the request fails.
     */
    public void updateObject(Identifier id, Acl acl, MetadataList metadata,
            Extent extent, byte[] data, String mimeType) {
        updateObjectFromSegment(id, acl, metadata, extent, data == null ? null
                : new BufferSegment(data), mimeType, null);
    }
View Full Code Here

Examples of com.emc.esu.api.BufferSegment

     * @throws EsuException if the request fails.
     */
    public void updateObject(Identifier id, Acl acl, MetadataList metadata,
            Extent extent, byte[] data, String mimeType, Checksum checksum ) {
        updateObjectFromSegment(id, acl, metadata, extent, data == null ? null
                : new BufferSegment(data), mimeType, checksum);
    }
View Full Code Here

Examples of com.emc.esu.api.BufferSegment

    @Override
    public ObjectId createObjectWithKey( String keyPool, String key, Acl acl, MetadataList metadata,
                                         byte[] data, long length, String mimeType ) {
        return createObjectWithKeyFromSegment( keyPool, key, acl, metadata,
                                               new BufferSegment( data, 0, (int) length ), mimeType );
    }
View Full Code Here

Examples of com.emc.esu.api.BufferSegment

    @Override
    public ObjectId createObjectWithKey( String keyPool, String key, Acl acl, MetadataList metadata,
                                         byte[] data, long length, String mimeType, Checksum checksum ) {
        return createObjectWithKeyFromSegment( keyPool, key, acl, metadata,
                                               new BufferSegment( data, 0, (int) length ), mimeType, checksum );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.