public void deleteMessage(int messageIndex){
synchronized (bufLock) {
    buffer.remove(messageIndex);
  }
}

public void deleteMessage ( int messageIndex ) { synchronized ( bufLock ) { buffer . remove ( messageIndex ) ; } }
removes a message from the buffer
