src/org/ohmage/cache/XVideoDirectoryCache.java
private static String directoryNameBuilder(
			final long name,
			final int numFilesPerDirectory) {
		
		int nameLength = String.valueOf(name).length();
		int maxLength = new Double(Math.log10(numFilesPerDirectory)).intValue();
		int numberOfZeros = maxLength - nameLength;
		
		StringBuilder builder = new StringBuilder();
		for(int i = 0; i < numberOfZeros; i++) {
			builder.append("0");
		}
		builder.append(String.valueOf(name));
		
		return builder.toString();
	}
/**
	 * Builds the name of a folder by prepending zeroes where necessary and
	 * converting the name into a String.
	 * 
	 * @param name The name of the file as an integer.
	 * 
	 * @param numFilesPerDirectory The maximum number of files allowed in the
	 * 							   directory used to determine how many zeroes
	 * 							   to prepend.
	 * 
	 * @return A String representing the directory name based on the
	 * 		   parameters.
	 */
Builds the name of a folder by prepending zeroes where necessary and
converting the name into a String.

@param name The name of the file as an integer.

@param numFilesPerDirectory The maximum number of files allowed in the
directory used to determine how many zeroes
to prepend.

@return A String representing the directory name based on the
parameters.
Builds the name of a folder by prepending zeroes where necessary and converting the name into a String . @param name The name of the file as an integer . @param numFilesPerDirectory The maximum number of files allowed in the directory used to determine how many zeroes to prepend . @return A String representing the directory name based on the parameters .
private static String directoryNameBuilder(
			final long name,
			final int numFilesPerDirectory) {
		int nameLength = String.valueOf(name).length();
		int maxLength = new Double(Math.log10(numFilesPerDirectory)).intValue();
		int numberOfZeros = maxLength - nameLength;
		StringBuilder builder = new StringBuilder();
		for(int i = 0; i < numberOfZeros; i++) {
			builder.append("0");
		}
		builder.append(String.valueOf(name));
		return builder.toString();
	}
private static String directoryNameBuilder ( final long name , final int numFilesPerDirectory ) { int nameLength = String . valueOf ( name ) . length ( ) ; int maxLength = new Double ( Math . log10 ( numFilesPerDirectory ) ) . intValue ( ) ; int numberOfZeros = maxLength - nameLength ; StringBuilder builder = new StringBuilder ( ) ; for ( int i = 0 ; i < numberOfZeros ; i ++ ) { builder . append ( "0" ) ; } builder . append ( String . valueOf ( name ) ) ; return builder . toString ( ) ; }
Builds the name of a folder by prepending zeroes where necessary and
 converting the name into a String.
Builds the name of a folder by prepending zeroes where necessary and converting the name into a String .