Package com.sun.jersey.api.client

Examples of com.sun.jersey.api.client.WebResource.header()


            InputStream contentStream, CreateBlobOptions options)
            throws ServiceException {
        String path = createPathFromContainer(container);
        WebResource webResource = getResource(options).path(path).path(blob);

        Builder builder = webResource.header("x-ms-version", API_VERSION);

        builder = builder.header("x-ms-blob-type", "BlockBlob");
        builder = addPutBlobHeaders(options, builder);

        Object contentObject = (contentStream == null ? new byte[0]
View Full Code Here


                    new String(Base64.encode(blockId), "UTF-8"));
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }

        Builder builder = webResource.header("x-ms-version", API_VERSION);
        builder = addOptionalHeader(builder, "x-ms-lease-id",
                options.getLeaseId());
        builder = addOptionalHeader(builder, "Content-MD5",
                options.getContentMD5());
View Full Code Here

            throws ServiceException {
        String path = createPathFromContainer(container);
        WebResource webResource = getResource(options).path(path).path(blob)
                .queryParam("comp", "blocklist");

        Builder builder = webResource.header("x-ms-version", API_VERSION);
        builder = addOptionalHeader(builder, "x-ms-lease-id",
                options.getLeaseId());
        builder = addOptionalHeader(builder, "x-ms-blob-cache-control",
                options.getBlobCacheControl());
        builder = addOptionalHeader(builder, "x-ms-blob-content-type",
View Full Code Here

        String path = createPathFromContainer(container);
        WebResource webResource = getResource(options).path(path).path(blob);
        webResource = addOptionalQueryParam(webResource, "snapshot",
                options.getSnapshot());

        Builder builder = webResource.header("x-ms-version", API_VERSION);
        builder = addOptionalHeader(builder, "x-ms-lease-id",
                options.getLeaseId());
        builder = addOptionalAccessConditionHeader(builder,
                options.getAccessCondition());
View Full Code Here

        String path = createPathFromContainer(container);
        WebResource webResource = getResource(options).path(path).path(blob);
        webResource = addOptionalQueryParam(webResource, "snapshot",
                options.getSnapshot());

        Builder builder = webResource.header("x-ms-version", API_VERSION);
        builder = addOptionalHeader(builder, "x-ms-lease-id",
                options.getLeaseId());
        builder = addOptionalRangeHeader(builder, options.getRangeStart(),
                options.getRangeEnd());
        builder = addOptionalAccessConditionHeader(builder,
View Full Code Here

        } else if (options.isUncommittedList()) {
            webResource = addOptionalQueryParam(webResource, "blocklisttype",
                    "uncommitted");
        }

        Builder builder = webResource.header("x-ms-version", API_VERSION);
        builder = addOptionalHeader(builder, "x-ms-lease-id",
                options.getLeaseId());

        ClientResponse response = builder.get(ClientResponse.class);
        throwIfError(response);
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.