Package com.microsoft.windowsazure.services.blob.models

Examples of com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesResult


        String container = null;
        String blob = "createblobblocknullcontainerworks";
        String content = new String(new char[512]);
        service.createBlockBlob(container, blob, new ByteArrayInputStream(
                content.getBytes("UTF-8")));
        GetBlobPropertiesResult result = service.getBlobProperties(null, blob);
        GetBlobResult getBlobResult = service.getBlob(null, blob);

        // Assert
        assertNotNull(result);
        assertNotNull(result.getMetadata());
        assertEquals(0, result.getMetadata().size());
        BlobProperties props = result.getProperties();
        assertNotNull(props);

        assertEquals(content,
                inputStreamToString(getBlobResult.getContentStream(), "UTF-8"));
    }
View Full Code Here


                        .setCacheControl("test")
                        .setContentEncoding("UTF-8")
                        /* .setContentMD5("1234") */.setContentType(
                                "text/plain"));

        GetBlobPropertiesResult result = service.getBlobProperties(
                TEST_CONTAINER_FOR_BLOBS, "test2");

        // Assert
        assertNotNull(result);

        assertNotNull(result.getMetadata());
        assertEquals(0, result.getMetadata().size());

        BlobProperties props = result.getProperties();
        assertNotNull(props);
        assertEquals("test", props.getCacheControl());
        assertEquals("UTF-8", props.getContentEncoding());
        assertEquals("en-us", props.getContentLanguage());
        assertEquals("text/plain", props.getContentType());
View Full Code Here

        }

        ClientResponse response = builder.get(ClientResponse.class);
        throwIfNotSuccess(response);

        GetBlobPropertiesResult properties = getBlobPropertiesResultFromResponse(response);
        GetBlobResult blobResult = new GetBlobResult();
        blobResult.setProperties(properties.getProperties());
        blobResult.setMetadata(properties.getMetadata());
        blobResult.setContentStream(response.getEntityInputStream());
        return blobResult;
    }
View Full Code Here

        // Metadata
        HashMap<String, String> metadata = getMetadataFromHeaders(response);

        // Result
        GetBlobPropertiesResult result = new GetBlobPropertiesResult();
        result.setMetadata(metadata);
        result.setProperties(properties);
        return result;
    }
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.services.blob.models.GetBlobPropertiesResult

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.