code: public synchronized boolean flush() {
  		if (!validState) {
  			throw new InvalidStateException();
  		}
  		try {
  			flushBuffer();
  			return true;
  		} catch (Exception e) {
  			log.error("Exception in flush()", e);
  		}
  		return false;
  	}
docs: Flush buffer to file
  
  @return false if exception occur