title: How to read file chunk by chunk from S3 using aws-java-sdk
body: <p>I am trying to  read large file into chunks from S3  without cutting any line for parallel processing. </p>
  
  <p>Let me explain by example: 
  There is file of size 1G on S3. I want to divide this file into chucks of 64 MB. It is easy I can do it like  :</p>
  
  <pre><code>S3Object s3object = s3.getObject(new GetObjectRequest(bucketName, key));
  
  InputStream stream = s3object.getObjectContent();
  
  byte[] content = new byte[64*1024*1024];
  
  while (stream.read(content)  != -1) {
  
  //process content here 
  
  }
  </code></pre>
  
  <p>but problem with chunk is it may have 100 complete line and one incomplete. but I can not process incomplete line and don't want to discard it. </p>
  
  <p>Is any way to handle this situations ? means all chucks have no partial line.</p>