title: How to know the file count when uploading via multipart form-data in java
body: <p>I am trying to upload multiple files using multipart form-data in java and I am using play framework.</p>
  
  <p><code>Http.MultipartFormData body = request().body().asMultipartFormData();
   files=body.getFiles();</code></p>
  
  <p>But I may have more than 1 file and I need to know the count of files in body.</p>
  
  <p>I got the file count using a for loop. </p>
  
  <p>But Is there a better way to get the file count without using a loop.</p>