code: public static void consume(final HttpEntity entity) throws IOException {
          if (entity == null) {
              return;
          }
          if (entity.isStreaming()) {
              InputStream instream = entity.getContent();
              if (instream != null) {
                  instream.close();
              }
          }
      }
docs: Ensures that the entity content is fully consumed and the content stream, if exists,
  is closed.
  
  @param entity
  @throws IOException if an error occurs reading the input stream
  
  @since 4.1