getAllFiles( new File( tempFolder ), fileList );
getAllFiles( new File( tempFolder ), fileList );  if ( streamSorter != null ) { ArrayList streamNameList = new ArrayList(); for ( int i=0; i<fileList.size(); i++ ) { File file = (File)fileList.get(i); streamNameList.add( ArchiveUtil.generateRelativePath(tempFolder, file.getAbsolutePath()) ); }  ArrayList sortedNameList = streamSorter.sortStream( streamNameList );  if ( sortedNameList != null ) { fileList.clear(); for ( int i=0; i<sortedNameList.size(); i++ ) { String fileName = ArchiveUtil.generateFullPath( tempFolder, (String)sortedNameList.get(i) ); fileList.add( new File(fileName) ); } } }
	private void createFileFromFolder( ) throws IOException	{		// Create the file		File targetFile = new File( fileName );		ArchiveUtil.DeleteAllFiles( targetFile );			RandomAccessFile compoundFile = null;		compoundFile = new RandomAccessFile( targetFile, "rw" );  //$NON-NLS-1$		compoundFile.writeLong(0); 	// reserve a spot for writing the start position of the stream data section in the file		compoundFile.writeLong(0);	// reserve a sopt for writing the entry number of the lookup map.		ArrayList fileList = new ArrayList();		getAllFiles( new File( tempFolder ), fileList );		// Generate the in-memory lookup map and serialize it to the compound file.		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++;		}		// Write the all of the streams to the stream data section in the compound file		long streamSectionPos = compoundFile.getFilePointer();		for ( int i=0; i<fileList.size(); i++ )		{			File file = (File)fileList.get(i);			copyFileIntoTheArchive( file, compoundFile );		}							// go back and write the start position of the stream data section and the entry number of the lookup map 		compoundFile.seek( 0 );						 		compoundFile.writeLong( streamSectionPos );			compoundFile.writeLong( entryNum );		// close the file		compoundFile.close();			}