public void reset(boolean clear){
  gotVersion=false;
  gotHeaderLength=false;
  gotHeader=false;
  gotBody=false;
  gotBodyBoundary=false;
  headerLength=0;
  bodyLength=0;
  bodyBytesReceived=0;
  if (clear) {
    bufferOffset=0;
    buffer.clear();
    bodyFile=null;
    if (bodyStream != null) {
      try {
        bodyStream.close();
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
      bodyStream=null;
    }
  }
}

public void reset ( boolean clear ) { gotVersion = false ; gotHeaderLength = false ; gotHeader = false ; gotBody = false ; gotBodyBoundary = false ; headerLength = 0 ; bodyLength = 0 ; bodyBytesReceived = 0 ; if ( clear ) { bufferOffset = 0 ; buffer . clear ( ) ; bodyFile = null ; if ( bodyStream != null ) { try { bodyStream . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } bodyStream = null ; } } }
reset the state of the receiver in preparation for a new sessionmessage .
