private boolean traxEnd(byte[] data, int len) {
    if (len < 6 || len > 18)
      return false;
    String s = new String(data, 5, len - 5);

    s = s.toLowerCase();
    s = s.replaceAll("\\s", "");
    if (s.contentEquals("commit") || s.contentEquals("rollback"))
      return true;
    else
      return false;
  }