Bug 123038 Change order of BIRT streams
Currenlty, birt streams have no order. For example, the version number is stored at the very end of the file! Need to exert some ordering.
core/org.eclipse.birt.core/src/org/eclipse/birt/core/archive/FileArchiveWriter.java
File targetFile = new File( fileName );
		ArchiveUtil.DeleteAllFiles( targetFile );	
		RandomAccessFile compoundFile = null;
		compoundFile = new RandomAccessFile( targetFile, "rw" );  
		compoundFile.writeLong(0); 	
		compoundFile.writeLong(0);	
		ArrayList fileList = new ArrayList();
		getAllFiles( new File( tempFolder ), fileList );
		
		long streamRelativePosition = 0;
		long entryNum = 0;
		for ( int i=0; i<fileList.size(); i++ )
		{
			File file = (File)fileList.get(i);				
			String relativePath = ArchiveUtil.generateRelativePath( tempFolder, file.getAbsolutePath() );
			
			compoundFile.writeUTF( relativePath );
			compoundFile.writeLong( streamRelativePosition );
			compoundFile.writeLong( file.length() );
			
			streamRelativePosition += file.length();
			entryNum++;
		}
		
		long streamSectionPos = compoundFile.getFilePointer();
		for ( int i=0; i<fileList.size(); i++ )
		{
			File file = (File)fileList.get(i);
			copyFileIntoTheArchive( file, compoundFile );
		}