code: private void saveToPropertyVfsBundle() throws CmsException {
  
          for (Locale l : m_changedTranslations) {
              SortedProperties props = m_localizations.get(l);
              LockedFile f = m_lockedBundleFiles.get(l);
              if ((null != props) && (null != f)) {
                  try {
                      ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
                      Writer writer = new OutputStreamWriter(outputStream, f.getEncoding());
                      props.store(writer, null);
                      byte[] contentBytes = outputStream.toByteArray();
                      CmsFile file = f.getFile();
                      file.setContents(contentBytes);
                      String contentEncodingProperty = m_cms.readPropertyObject(
                          file,
                          CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING,
                          false).getValue();
                      if ((null == contentEncodingProperty) || !contentEncodingProperty.equals(f.getEncoding())) {
                          m_cms.writePropertyObject(
                              m_cms.getSitePath(file),
                              new CmsProperty(
                                  CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING,
                                  f.getEncoding(),
                                  f.getEncoding()));
                      }
                      m_cms.writeFile(file);
                  } catch (IOException e) {
                      LOG.error(
                          Messages.get().getBundle().key(
                              Messages.ERR_READING_FILE_UNSUPPORTED_ENCODING_2,
                              f.getFile().getRootPath(),
                              f.getEncoding()),
                          e);
  
                  }
              }
          }
      }
docs: Saves messages to a propertyvfsbundle file.
  
  @throws CmsException thrown if writing to the file fails.