public boolean readMessage(InputStream is) throws IOException {
  Thread thread=Thread.currentThread();
  ClassLoader loader=thread.getContextClassLoader();
  try (OutboxAmp outbox=OutboxAmp.currentOrCreate(getManager())){
    return readMessage(is,outbox);
  }
 catch (  Throwable e) {
    log.log(Level.WARNING,e.toString(),e);
    throw e;
  }
 finally {
    thread.setContextClassLoader(loader);
  }
}

public boolean readMessage ( InputStream is ) throws IOException { Thread thread = Thread . currentThread ( ) ; ClassLoader loader = thread . getContextClassLoader ( ) ; try ( OutboxAmp outbox = OutboxAmp . currentOrCreate ( getManager ( ) ) ) { return readMessage ( is , outbox ) ; } catch ( Throwable e ) { log . log ( Level . WARNING , e . toString ( ) , e ) ; throw e ; } finally { thread . setContextClassLoader ( loader ) ; } }
reads the next hmtp packet from the stream , returning false on end of file .
