private static void vHeadObject() throws IOException
    {
		String bucketName="chttest1";
		String fileName="apple.txt";
		String vid = "72b3f39f520c411db753039b7567d069"; 
		StringBuffer buffer = new StringBuffer(); 
		String line="";
				
		AmazonS3 s3 = new AmazonS3Client(new PropertiesCredentials(putBucket.class.getResourceAsStream("AwsCredentials.properties")));
		try
		{                
            System.out.println("head Object with vid");
            //GetObjectMetadataRequest request = new GetObjectMetadataRequest(bucketName,fileName,vid);
            GetObjectMetadataRequest request = new GetObjectMetadataRequest(bucketName,fileName).withVersionId(vid);
            ObjectMetadata object = s3.getObjectMetadata(request);

            System.out.println(object.getContentLength());
            System.out.println(object.getETag());
            System.out.println(object.getVersionId());
            System.out.println(object.getLastModified());       
            System.out.println();
            
		}
		catch (AmazonServiceException ase) {
            System.out.println("Caught an AmazonServiceException, which means your request made it "
                    + "to Amazon S3, but was rejected with an error response for some reason.");
            System.out.println("Error Message:    " + ase.getMessage());
            System.out.println("HTTP Status Code: " + ase.getStatusCode());
            System.out.println("AWS Error Code:   " + ase.getErrorCode());
            System.out.println("Error Type:       " + ase.getErrorType());
            System.out.println("Request ID:       " + ase.getRequestId());
        } catch (AmazonClientException ace) {
            System.out.println("Caught an AmazonClientException, which means the client encountered "
                    + "a serious internal problem while trying to communicate with S3, "
                    + "such as not being able to access the network.");
            System.out.println("Error Message: " + ace.getMessage());
        }
    }