code: public Entry addEntry(final Entry entry) throws Exception {
          synchronized (FileStore.getFileStore()) {
              final Feed f = getFeedDocument();
  
              final String fsid = FileStore.getFileStore().getNextId();
              updateTimestamps(entry);
  
              // Save entry to file
              final String entryPath = getEntryPath(fsid);
  
              final OutputStream os = FileStore.getFileStore().getFileOutputStream(entryPath);
              updateEntryAppLinks(entry, fsid, true);
              Atom10Generator.serializeEntry(entry, new OutputStreamWriter(os, "UTF-8"));
              os.flush();
              os.close();
  
              // Update feed file
              updateEntryAppLinks(entry, fsid, false);
              updateFeedDocumentWithNewEntry(f, entry);
  
              return entry;
          }
      }
docs: Add entry to collection.
  
  @param entry Entry to be added to collection. Entry will be saved to disk in a directory
  under the collection's directory and the path will follow the pattern
  [collection-plural]/[entryid]/entry.xml. The entry will be added to the
  collection's feed in [collection-plural]/feed.xml.
  @throws java.lang.Exception On error.
  @return Entry as it exists on the server.