private boolean processSingleEvent(){
  if (eventBuffer.remaining() < 20) {
    return false;
  }
  try {
    eventBuffer.getInt();
    final int bufferLength=eventBuffer.getInt();
    final int padding=(4 - bufferLength) & 3;
    if (eventBuffer.remaining() < bufferLength + padding + 12)     return false;
    final byte[] buffer=new byte[bufferLength];
    eventBuffer.get(buffer);
    eventBuffer.position(eventBuffer.position() + padding);
    int eventCount=0;
    if (bufferLength > 4) {
      eventCount=iscVaxInteger(buffer,bufferLength - 4,4);
    }
    eventBuffer.getLong();
    int eventId=eventBuffer.getInt();
    log.debug(String.format("Received event id %d, eventCount %d",eventId,eventCount));
    channelListenerDispatcher.eventReceived(this,new AsynchronousChannelListener.Event(eventId,eventCount));
    return true;
  }
 catch (  BufferUnderflowException ex) {
    return false;
  }
}

private boolean processSingleEvent ( ) { if ( eventBuffer . remaining ( ) < 20 ) { return false ; } try { eventBuffer . getInt ( ) ; final int bufferLength = eventBuffer . getInt ( ) ; final int padding = ( 4 - bufferLength ) & 3 ; if ( eventBuffer . remaining ( ) < bufferLength + padding + 12 ) return false ; final byte [ ] buffer = new byte [ bufferLength ] ; eventBuffer . get ( buffer ) ; eventBuffer . position ( eventBuffer . position ( ) + padding ) ; int eventCount = 0 ; if ( bufferLength > 4 ) { eventCount = iscVaxInteger ( buffer , bufferLength - 4 , 4 ) ; } eventBuffer . getLong ( ) ; int eventId = eventBuffer . getInt ( ) ; log . debug ( String . format ( "Received event id %d, eventCount %d" , eventId , eventCount ) ) ; channelListenerDispatcher . eventReceived ( this , new AsynchronousChannelListener . Event ( eventId , eventCount ) ) ; return true ; } catch ( BufferUnderflowException ex ) { return false ; } }
processes the event buffer for a single event .
