public long getAdjustedFileAlignment ( ) { long fileAlign = get ( FILE_ALIGNMENT ) ; if ( isLowAlignmentMode ( ) ) { return 1 ; } if ( fileAlign < 512 ) { // TODO correct? fileAlign = 512 ; } // TODO what happens for too big alignment? // TODO this is just a test, verify if ( fileAlign % 512 != 0 ) { long rest = fileAlign % 512 ; fileAlign += ( 512 - rest ) ; } return fileAlign ; }
Adjusts the file alignment to low alignment mode if necessary .