protected void assertExtractSource ( File archive ) throws FileNotFoundException , IllegalArgumentException { if ( archive . isDirectory ( ) ) { throw new IllegalArgumentException ( "Can not extract " + archive + ". Source is a directory." ) ; } else if ( ! archive . exists ( ) ) { throw new FileNotFoundException ( archive . getPath ( ) ) ; } else if ( ! archive . canRead ( ) ) { throw new IllegalArgumentException ( "Can not extract " + archive + ". Can not read from source." ) ; } }
Asserts that the given File object is a readable file that can be used to extract from .