title: creating a folder/uploading a file in amazon S3 bucket using API
body: <p>I am a total newbie to amazon and java. 
  I am trying two things here.</p>
  
  <p>1st - I am trying to create a folder in my Amazon S3 bucket that i have already created and have got the credentials for. </p>
  
  <p>2nd -  I am trying to upload a file to this bucket.</p>
  
  <p>As per my understanding i can use putObjectRequest() method for acheiving both of my tasks.  </p>
  
  <pre><code>PutObjectRequest(bucketName, keyName, file) 
  </code></pre>
  
  <p>for uploading a file. </p>
  
  <p>I am not sure if i should use this method</p>
  
  <pre><code>PutObjectRequest(String bucketName, String key, InputStream input,
          ObjectMetadata metadata) 
  </code></pre>
  
  <p>for just creating a folder. I am struggeling with InputSteam and ObjectMetadata. I don't know what exactly is this for and how can i use it. </p>
  
  <p>Any help would be greatly appreciated. :)</p>