public static boolean isValidBedGraphLine(String line){
  String[] bdg=line.split("\t");
  if (bdg.length < 4) {
    return false;
  }
  try {
    Integer.parseInt(bdg[1]);
    Integer.parseInt(bdg[2]);
  }
 catch (  NumberFormatException e) {
    return false;
  }
  return true;
}

public static boolean isValidBedGraphLine ( String line ) { String [ ] bdg = line . split ( "\t" ) ; if ( bdg . length < 4 ) { return false ; } try { Integer . parseInt ( bdg [ 1 ] ) ; Integer . parseInt ( bdg [ 2 ] ) ; } catch ( NumberFormatException e ) { return false ; } return true ; }
return true if line looks like a valid bedgraph record
