public static void writeMap(Map paramMap, OutputStream paramOutputStream) throws IOException
  {
    Dimension localDimension = paramMap.getSize();
    ObjectOutputStream localObjectOutputStream;
    if ((paramOutputStream instanceof ObjectOutput))
      localObjectOutputStream = (ObjectOutputStream)paramOutputStream;
    else
      localObjectOutputStream = new ObjectOutputStream(paramOutputStream);
    localObjectOutputStream.writeDouble(0.2D);
    localObjectOutputStream.writeObject(localDimension);
    Vector localVector1 = new Vector(); Vector localVector2 = new Vector();
    for (int i = 0; i < localDimension.width; i++)
      for (int j = 0; j < localDimension.height; j++)
      {
        MapCell localMapCell1 = paramMap.getCell(i, j);
        if (!localVector1.contains(localMapCell1.getFilename()))
          localVector1.addElement(localMapCell1.getFilename());
        if (!localVector2.contains(localMapCell1.getCategory()))
          localVector2.addElement(localMapCell1.getCategory());
      }
    localObjectOutputStream.writeObject(localVector1);
    localObjectOutputStream.writeObject(localVector2);
    for (int j = 0; j < localDimension.width; j++)
      for (int k = 0; k < localDimension.height; k++)
      {
        MapCell localMapCell2 = paramMap.getCell(j, k);
        localObjectOutputStream.writeInt(localVector1.indexOf(localMapCell2.getFilename()));
        localObjectOutputStream.writeInt(localMapCell2.getImpassibility());
        localObjectOutputStream.writeBoolean(localMapCell2.getStorm());
        localObjectOutputStream.writeInt(localVector2.indexOf(localMapCell2.getCategory()));
      }
    localObjectOutputStream.writeObject("EOF");
  }