static void finishLastResponse(final HttpConnection conn){
  final InputStream lastResponse=conn.getLastResponseInputStream();
  if (lastResponse != null) {
    conn.setLastResponseInputStream(null);
    try {
      lastResponse.close();
    }
 catch (    final IOException ioe) {
      conn.close();
    }
  }
}

static void finishLastResponse ( final HttpConnection conn ) { final InputStream lastResponse = conn . getLastResponseInputStream ( ) ; if ( lastResponse != null ) { conn . setLastResponseInputStream ( null ) ; try { lastResponse . close ( ) ; } catch ( final IOException ioe ) { conn . close ( ) ; } } }
since the same connection is about to be reused , make sure the previous request was completely processed , and if not consume it now .
