public void writeNarc(String narcPath) throws IOException
	{
		HexOutputStream output = new HexOutputStream(new FileOutputStream(narcPath));
		output.writeInt(1129464142);
		output.writeInt(16842750);
		int offset=output.getPosition();
		output.writeInt(0);
		output.writeShort((short)16);
		output.writeShort((short)3);
		output.writeInt(1178686530);
		output.writeInt(12+fimgEntry.size()*8);
		output.writeInt(fimgEntry.size());
		int num=0;
		for(int i=0;i<fimgEntry.size();i++)
		{
			while(num%4!=0)
				num++;
			output.writeInt(num);
			num+=fimgEntry.get(i).getEntrydata().size();
			output.writeInt(num);
		}
		output.writeInt(1179538498);
		output.writeInt(16);
		output.writeInt(4);
		output.writeInt(65536);
		output.writeInt(1179209031);
		int offset2=output.getPosition();
		output.writeInt(0);
		num=0;
		for(int i=0;i<fimgEntry.size();i++)
		{
			while(num%4!=0)
			{
				output.writeByte((byte) 255);
				num++;
			}
			output.writeBuffer(fimgEntry.get(i).getEntrydata());
			num+=fimgEntry.get(i).getEntrydata().size();
		}
		int value=output.getPosition();
		output.seek(offset);
		output.writeInt(value);
		output.seek(offset2);
		output.writeInt(num+8);
		output.close();
	}