code: private static NlsMessage getMessage(IoMode mode) {
  
      NlsBundleUtilIoRoot bundle = createBundle(NlsBundleUtilIoRoot.class);
      switch (mode) {
        case READ:
          return bundle.errorIoRead();
        case WRITE:
          return bundle.errorIoWrite();
        case CLOSE:
          return bundle.errorIoClose();
        case FLUSH:
          return bundle.errorIoFlush();
        case COPY:
          return bundle.errorIoCopy();
        default:
          assert (false) : "IoMode is null!";
          return bundle.errorIo();
      }
    }
docs: This method gets the {@link net.sf.mmm.util.nls.api.NlsMessage#getInternationalizedMessage() message} according to
  the given {@code mode}.
  
  @param mode is the {@link IoMode} or {@code null} if unknown.
  @return the message according to {@code mode}.