title: Java - Read (JSON) data from S3 object line by line
body: <p>I have an S3 object that contains JsonL lines. I want to read this object line by line in Java so that I can recursively keep parsing each line (i.e, each json) into a POJO and eventually convert the object contents into a list of POJO.</p>
  
  <p>As I understand, <code>AmazonS3.getObject().getObjectContent()</code> returns a stream to the object's content. My next step is to read a line and convert to string which I can then parse into a POJO. I am not sure how to operate on this <code>InputStream</code> to keep obtaining the next line in String format.</p>
  
  <p>Sample data :</p>
  
  <pre><code>{"key1":"val", "key2":"val1", "key3":"val2"}
  {"key1":"val3", "key2":"val4", "key3":"val5"}
  {"key1":"val6", "key2":"val7", "key3":"val8"}
  </code></pre>