title: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
body: <p>I need to map a JSON array object with java POJO class. 
  I wrote the code like this:</p>
  
  <pre><code>// execute the client with get method 
  InputStream inputStream = getMethod.getResponseBodyAsStream();
  
  BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
  
  ObjectMapper objectMapper = new ObjectMapper();
  
  JsonFactory jsonFactory = new JsonFactory();
  List&lt;OwnerDetail&gt; owners = new ArrayList&lt;&gt;();
  JsonParser jsonParser = jsonFactory.createJsonParser(inputStream);
  
  if (jsonParser.nextToken() != null &amp;&amp; jsonParser.)
  { // end-of-input
    owners = objectMapper.readValue(bufferedReader, TypeFactory.defaultInstance().constructCollectionType(List.class, OwnerDetail.class));
  }
  </code></pre>
  
  <p>The above block is giving me following error:</p>
  
  <pre><code>com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
  at [Source: java.io.BufferedReader@5e66c5fc; line: 1, column: 1]
  at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
  at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3029)
  at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2971)
  at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2128)
  </code></pre>
  
  <p>Any help would be appreciated. Thanks.</p>