note

 

http://jersey.java.net/nonav/documentation/latest/user-guide.html

http://www.vogella.de/articles/JAXB/article.html

http://www.vogella.de/articles/REST/article.html

http://msdn.microsoft.com/en-us/library/gg278338.aspx

http://blogs.msdn.com/b/windowsazure/archive/2011/05/18/using-the-service-bus-via-rest-http.aspx

 

 

 

 

https://github.com/WindowsAzure/azure-sdk-for-java

http://go.microsoft.com/fwlink/?LinkID=236226

http://msdn.microsoft.com/en-us/library/windowsazure/hh690943(v=VS.103).aspx

http://msdn.microsoft.com/en-us/library/windowsazure/hh691732(VS.103).aspx

http://msdn.microsoft.com/en-us/library/windowsazure/hh691733(VS.103).aspx

 

 

 

import com.microsoft.windowsazure.services.core.storage.*;

import com.microsoft.windowsazure.services.blob.client.*;

 

public class BlobSample {

 

    public static final String storageConnectionString = 

            "DefaultEndpointsProtocol=http;" + 

               "AccountName=your_account_name;" + 

               "AccountKey= your_account_name"; 

 

    public static void main(String[] args) 

    {

        try

        {

            CloudStorageAccount account;

            CloudBlobClient serviceClient;

            CloudBlobContainer container;

            CloudBlockBlob blob;

 

            account = CloudStorageAccount.parse(storageConnectionString);

            serviceClient = account.createCloudBlobClient();

            // Container name must be lower case.

            container = serviceClient.getContainerReference("blobsample");

            container.createIfNotExist();

 

            // Set anonymous access on the container.

            BlobContainerPermissions containerPermissions;

            containerPermissions = new BlobContainerPermissions();

 

            // Upload an image file.

            blob = container.getBlockBlobReference("image1.jpg");

            File fileReference = new File ("c:\\myimages\\image1.jpg");

            blob.upload(new FileInputStream(fileReference), fileReference.length());

        }

        catch (FileNotFoundException fileNotFoundException)

        {

            System.out.print("FileNotFoundException encountered: ");

            System.out.println(fileNotFoundException.getMessage());

            System.exit(-1);

        }

        catch (StorageException storageException)

        {

            System.out.print("StorageException encountered: ");

            System.out.println(storageException.getMessage());

            System.exit(-1);

        }

        catch (Exception e)

        {

            System.out.print("Exception encountered: ");

            System.out.println(e.getMessage());

            System.exit(-1);

        }

 

    }

}



http://ec2-46-137-124-143.eu-west-1.compute.amazonaws.com/svn/microsoft

你可能感兴趣的:(Note)