+ char firstChar = data.charAt(0);
+ int colonPos = data.indexOf(":");
+ int commaPos = data.indexOf(",");
+ boolean isJnet = firstChar != '*' && firstChar != ' ' && colonPos > -1
+ && commaPos > -1 && colonPos < commaPos;
+ // && data.indexOf(",")<data.indexOf(",", data.indexOf(","))) / ??
+ return isJnet;
+ }
+
+ /**
+ * Returns true if the data has at least 6 tab-delimited fields _and_
+ * fields 4 and 5 are integer (start/end)
+ * @param data
+ * @return
+ */
+ protected boolean looksLikeFeatureData(String data)
+ {
+ if (data == null)
+ {
+ return false;
+ }
+ String[] columns = data.split("\t");
+ if (columns.length < 6) {
+ return false;
+ }
+ for (int col = 3; col < 5; col++)
+ {
+ try {
+ Integer.parseInt(columns[col]);
+ } catch (NumberFormatException e) {
+ return false;
+ }
+ }
+ return true;
+ }