title: Best way to read a file from Amazon S3 in Java
body: <p>I am being given a URL to an S3 file in the following format:</p>
  
  <p>s3n://XXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXX@bucket/foo/bar.json</p>
  
  <p>What is the best way to go about pulling the json file from this location? </p>
  
  <p>I would like to treat the URL as an opaque value, and avoid parsing it so that it can change with out me needing to change the underlying code.</p>
  
  <p>When I attempt to pass the value to java.net.URL it throws a Mal Formed Exception, because it doesn't recognize the S3 protocol.</p>
  
  <p>Thank you!</p>