private void reset() throws IOException {
  http.reuse=true;
  reuseClient=http;
  InputStream is=http.getInputStream();
  if (!method.equals("HEAD")) {
    try {
      if ((is instanceof ChunkedInputStream) || (is instanceof MeteredStream)) {
        while (is.read(cdata) > 0) {
        }
      }
 else {
        long cl=0;
        int n=0;
        String cls=responses.findValue("Content-Length");
        if (cls != null) {
          try {
            cl=Long.parseLong(cls);
          }
 catch (          NumberFormatException e) {
            cl=0;
          }
        }
        for (long i=0; i < cl; ) {
          if ((n=is.read(cdata)) == -1) {
            break;
          }
 else {
            i+=n;
          }
        }
      }
    }
 catch (    IOException e) {
      http.reuse=false;
      reuseClient=null;
      disconnectInternal();
      return;
    }
    try {
      if (is instanceof MeteredStream) {
        is.close();
      }
    }
 catch (    IOException e) {
    }
  }
  responseCode=-1;
  responses=new MessageHeader();
  connected=false;
}

private void reset ( ) throws IOException { http . reuse = true ; reuseClient = http ; InputStream is = http . getInputStream ( ) ; if ( ! method . equals ( "HEAD" ) ) { try { if ( ( is instanceof ChunkedInputStream ) || ( is instanceof MeteredStream ) ) { while ( is . read ( cdata ) > 0 ) { } } else { long cl = 0 ; int n = 0 ; String cls = responses . findValue ( "Content-Length" ) ; if ( cls != null ) { try { cl = Long . parseLong ( cls ) ; } catch ( NumberFormatException e ) { cl = 0 ; } } for ( long i = 0 ; i < cl ; ) { if ( ( n = is . read ( cdata ) ) == - 1 ) { break ; } else { i += n ; } } } } catch ( IOException e ) { http . reuse = false ; reuseClient = null ; disconnectInternal ( ) ; return ; } try { if ( is instanceof MeteredStream ) { is . close ( ) ; } } catch ( IOException e ) { } } responseCode = - 1 ; responses = new MessageHeader ( ) ; connected = false ; }
reset ( without disconnecting the tcp conn ) in order to do another transaction with this instance
