code: private void writeObject (ObjectOutputStream out)
          throws IOException
      {
          out.writeInt(size());
  
          for (IntEntry<TileSet> entry : intEntrySet()) {
              out.writeInt(entry.getIntKey());
              out.writeObject(entry.getValue());
          }
      }
docs: custom serialization process