private void putParameterIntoS3(String s3BucketName,String s3ObjectKey,Parameter parameter){
  String content=parameter.getName() + "=" + parameter.getValue();
  byte[] bytes=content.getBytes();
  ByteArrayInputStream inputStream=new ByteArrayInputStream(bytes);
  ObjectMetadata metadata=new ObjectMetadata();
  metadata.setContentLength(content.length());
  PutObjectRequest putObjectRequest=new PutObjectRequest(s3BucketName,s3ObjectKey,inputStream,metadata);
  s3Operations.putObject(putObjectRequest,null);
}

private void putParameterIntoS3 ( String s3BucketName , String s3ObjectKey , Parameter parameter ) { String content = parameter . getName ( ) + "=" + parameter . getValue ( ) ; byte [ ] bytes = content . getBytes ( ) ; ByteArrayInputStream inputStream = new ByteArrayInputStream ( bytes ) ; ObjectMetadata metadata = new ObjectMetadata ( ) ; metadata . setContentLength ( content . length ( ) ) ; PutObjectRequest putObjectRequest = new PutObjectRequest ( s3BucketName , s3ObjectKey , inputStream , metadata ) ; s3Operations . putObject ( putObjectRequest , null ) ; }
puts a java properties file content into s3 . the properties contains a single key - value defined by the given parameter object .
