public static void main ( String [ ] args ) { if ( args . length == 0 ) { System . out . println ( "Usage: BGZFBlockIndex [BGZF block indices...]\n\n" + "Writes a few statistics about each BGZF block index." ) ; return ; } for ( String arg : args ) { final File f = new File ( arg ) ; if ( f . isFile ( ) && f . canRead ( ) ) { try { System . err . printf ( "%s:\n" , f ) ; final BGZFBlockIndex bi = new BGZFBlockIndex ( f ) ; final long second = bi . secondBlock ( ) ; final long last = bi . lastBlock ( ) ; System . err . printf ( "\t%d blocks\n" + "\tfirst after 0 is at %#014x\n" + "\tlast is at %#014x\n" + "\tassociated BGZF file size %d\n" , bi . size ( ) - 1 , bi . secondBlock ( ) , bi . lastBlock ( ) , bi . fileSize ( ) ) ; } catch ( IOException e ) { System . err . printf ( "Failed to read %s!\n" , f ) ; e . printStackTrace ( ) ; } } else System . err . printf ( "%s does not look like a readable file!\n" , f ) ; } }
Writes some statistics about each BGZF block index file given as an argument .