public static void save(final String filename) throws IOException {
   final FileOutputStream fos = FileHelper.createFileOutputStream(filename);
   final OutputBitStream ostream = new OutputBitStream(fos);
   ostream.writeInt(ElementPropertiesLibrary.m_elements.size());
   final TIntObjectIterator<ElementProperties> iter =
       ElementPropertiesLibrary.m_elements.iterator();
   for (int i = ElementPropertiesLibrary.m_elements.size(); i > 0; --i) {
     iter.advance();
     iter.value().save(ostream);
   }
   ostream.close();
 }
 public void save(final OutputBitStream os) throws IOException {
   final int numSounds = (this.m_soundIds != null) ? this.m_soundIds.length : 0;
   os.writeInt(numSounds);
   for (int i = 0; i < numSounds; ++i) {
     os.writeLong(this.m_soundIds[i]);
     os.writeByte(this.m_gains[i]);
   }
   os.writeBooleanBit(this.m_loop);
   os.writeInt(this.m_rollOffId);
   os.writeInt(this.m_fadeOutTime);
   os.writeBooleanBit(this.m_stopOnRemoveAps);
   os.writeInt(this.m_delay);
 }
 @Override
 protected void writeToStream(
     final OutputBitStream ostream, final ParticleBitmapModel min, final ParticleBitmapModel max)
     throws IOException {
   final boolean leveled = !this.equals(min, max);
   ostream.writeBooleanBit(leveled);
   ostream.writeBooleanBit(min.m_scaleRandomKeepRatio);
   ostream.align();
   ostream.writeInt(min.m_bitmapId);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_hotX, max.m_hotX);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_hotY, max.m_hotY);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_scaleX, max.m_scaleX);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_scaleY, max.m_scaleY);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_scaleRandomX, max.m_scaleRandomX);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_scaleRandomY, max.m_scaleRandomY);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_rotation, max.m_rotation);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_rotationRandom, max.m_rotationRandom);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_redColor, max.m_redColor);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_greenColor, max.m_greenColor);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_blueColor, max.m_blueColor);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_alphaColor, max.m_alphaColor);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_redColorRandom, max.m_redColorRandom);
   AttributesReaderWriter.writeFloat(
       ostream, leveled, min.m_greenColorRandom, max.m_greenColorRandom);
   AttributesReaderWriter.writeFloat(
       ostream, leveled, min.m_blueColorRandom, max.m_blueColorRandom);
   AttributesReaderWriter.writeFloat(
       ostream, leveled, min.m_alphaColorRandom, max.m_alphaColorRandom);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_textureTop, max.m_textureTop);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_textureLeft, max.m_textureLeft);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_textureBottom, max.m_textureBottom);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_textureRight, max.m_textureRight);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_halfWidth, max.m_halfWidth);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_halfHeight, max.m_halfHeight);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_rotationX, max.m_rotationX);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_rotationY, max.m_rotationY);
   AttributesReaderWriter.writeFloat(ostream, leveled, min.m_rotationZ, max.m_rotationZ);
 }
 public void save(@NotNull final OutputBitStream ostream) throws IOException {
   ostream.writeInt(this.m_id);
   ostream.writeString(this.m_name);
 }