private boolean isMimeFormat(long format,String primaryType){
  String nat=getNativeForFormat(format);
  if (nat == null) {
    return false;
  }
  try {
    DataFlavor df=new DataFlavor(nat);
    if (primaryType.equals(df.getPrimaryType())) {
      return true;
    }
  }
 catch (  Exception e) {
  }
  return false;
}

private boolean isMimeFormat ( long format , String primaryType ) { String nat = getNativeForFormat ( format ) ; if ( nat == null ) { return false ; } try { DataFlavor df = new DataFlavor ( nat ) ; if ( primaryType . equals ( df . getPrimaryType ( ) ) ) { return true ; } } catch ( Exception e ) { } return false ; }
returns true if and only if the name of the specified format atom constitutes a valid mime type with the specified primary type .
