private static void hGetObject2() throws IOException
    {    	
    		String bucketName="chttest1";
    		String fileName="hello.txt";
    		
    		AmazonS3 s3 = new AmazonS3Client(new PropertiesCredentials(putBucket.class.getResourceAsStream("AwsCredentials.properties")));
    		try
    		{    			
                System.out.println("Getting Object");
                S3Object object = s3.getObject(new GetObjectRequest(bucketName,fileName).withNonmatchingETagConstraint("692b09f0ffdcd397f6af4243a1259c1e"));
                System.out.println("Content-Type: "  + object.getObjectMetadata().getContentType());
                System.out.println("Cache-Control: "  + object.getObjectMetadata().getCacheControl());
                System.out.println("Content-Encoding: "  + object.getObjectMetadata().getContentEncoding());
                System.out.println("Cache-Control: "  + object.getObjectMetadata().getContentDisposition());
                System.out.println("ETag: "  + object.getObjectMetadata().getETag());
                System.out.println("user-metadata: "  + object.getObjectMetadata().getUserMetadata());
                System.out.println("raw-metadata: "  + object.getObjectMetadata().getRawMetadata());
                System.out.println("Object Content: \n");
                displayTextInputStream(object.getObjectContent());
                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());
            }
    }