private void sendError(String status,String msg) throws InterruptedException {
  sendResponse(status,MIME_PLAINTEXT,null,new ByteArrayInputStream(msg.getBytes()));
  throw new InterruptedException();
}

private void sendError ( String status , String msg ) throws InterruptedException { sendResponse ( status , MIME_PLAINTEXT , null , new ByteArrayInputStream ( msg . getBytes ( ) ) ) ; throw new InterruptedException ( ) ; }
returns an error message as a http response and throws interruptedexception to stop furhter request processing .
