public String getMatch ( final byte [ ] content ) throws IOException { final ByteBuffer buf = readBuffer ( content ) ; if ( buf == null ) { return null ; } buf . position ( 0 ) ; final boolean matches = match ( buf ) ; if ( matches ) { final int subLen = this . subEntries . size ( ) ; final String myMimeType = getMimeType ( ) ; if ( subLen > 0 ) { String mtype = null ; for ( int k = 0 ; k < subLen ; k ++ ) { final MagicMimeEntry me = this . subEntries . get ( k ) ; mtype = me . getMatch ( content ) ; if ( mtype != null ) { return mtype ; } } if ( myMimeType != null ) { return myMimeType ; } } else { return myMimeType ; } } return null ; }
Gets the match .