title: character encoding of the server logs in s3
body: <p>As the question suggest, I lneed to know the encoding of the data in the server logs.</p>
  
  <p>I am getting the server logs using <code>S3ObjectInputStream</code>. as following:</p>
  
  <pre><code>amazonS3Client as3c;
  S3ObjectInputStream is = as3c.getObject(bucketName, key).getObjectContent();
  //read it for processing using buffered input stream.
  BufferedReader br = new BufferedReader(new InputStreamReader(is,..unknown..));
  //need character encoding(charset eg: UTF-8, UTF-16 etc.) of the data in the object 
  //to pass it to InputStreamReader.
  </code></pre>
  
  <p>In the docs, I only see <code>getContentEncoding()</code> function but I do not think that it fits my purpose.</p>
  
  <p>Useful references:</p>
  
  <p><a href="http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/ObjectMetadata.html#getContentEncoding%28%29" rel="nofollow">ObjectMetadata</a></p>
  
  <p><a href="http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/AmazonS3.html#getObjectMetadata%28java.lang.String,%20java.lang.String%29" rel="nofollow">AmazonS3Interface</a></p>