private final static MatchStrength tryMatch(InputAccessor acc, String matchStr, MatchStrength fullMatchStrength) throws IOException { for (int i = 0, len = matchStr.length(); i < len; ++i) { if (!acc.hasMoreBytes()) { return MatchStrength.INCONCLUSIVE; } if (acc.nextByte() != matchStr.charAt(i)) { return MatchStrength.NO_MATCH; } } return fullMatchStrength; }
private final static int skipSpace(InputAccessor acc, byte b) throws IOException { while (true) { int ch = (int) b & 0xFF; if (!(ch == ' ' || ch == '\r' || ch == '\n' || ch == '\t')) { return ch; } if (!acc.hasMoreBytes()) { return -1; } b = acc.nextByte(); ch = (int) b & 0xFF; } }
private final static int skipSpace(InputAccessor acc) throws IOException { if (!acc.hasMoreBytes()) { return -1; } return skipSpace(acc, acc.nextByte()); }
return MatchStrength.INCONCLUSIVE; byte b = acc.nextByte(); return MatchStrength.INCONCLUSIVE; if (acc.nextByte() != UTF8_BOM_2) { return MatchStrength.NO_MATCH; return MatchStrength.INCONCLUSIVE; if (acc.nextByte() != UTF8_BOM_3) { return MatchStrength.NO_MATCH; return MatchStrength.INCONCLUSIVE; b = acc.nextByte();
private final static MatchStrength tryMatch(InputAccessor acc, String matchStr, MatchStrength fullMatchStrength) throws IOException { for (int i = 0, len = matchStr.length(); i < len; ++i) { if (!acc.hasMoreBytes()) { return MatchStrength.INCONCLUSIVE; } if (acc.nextByte() != matchStr.charAt(i)) { return MatchStrength.NO_MATCH; } } return fullMatchStrength; }
private final static int skipSpace(InputAccessor acc, byte b) throws IOException { while (true) { int ch = (int) b & 0xFF; if (!(ch == ' ' || ch == '\r' || ch == '\n' || ch == '\t')) { return ch; } if (!acc.hasMoreBytes()) { return -1; } b = acc.nextByte(); ch = (int) b & 0xFF; } }
private final static int skipSpace(InputAccessor acc) throws IOException { if (!acc.hasMoreBytes()) { return -1; } return skipSpace(acc, acc.nextByte()); }
return MatchStrength.INCONCLUSIVE; byte b = acc.nextByte(); return MatchStrength.INCONCLUSIVE; if (acc.nextByte() != UTF8_BOM_2) { return MatchStrength.NO_MATCH; return MatchStrength.INCONCLUSIVE; if (acc.nextByte() != UTF8_BOM_3) { return MatchStrength.NO_MATCH; return MatchStrength.INCONCLUSIVE; b = acc.nextByte();
private final static MatchStrength tryMatch(InputAccessor acc, String matchStr, MatchStrength fullMatchStrength) throws IOException { for (int i = 0, len = matchStr.length(); i < len; ++i) { if (!acc.hasMoreBytes()) { return MatchStrength.INCONCLUSIVE; } if (acc.nextByte() != matchStr.charAt(i)) { return MatchStrength.NO_MATCH; } } return fullMatchStrength; }
private final static MatchStrength tryMatch(InputAccessor acc, String matchStr, MatchStrength fullMatchStrength) throws IOException { for (int i = 0, len = matchStr.length(); i < len; ++i) { if (!acc.hasMoreBytes()) { return MatchStrength.INCONCLUSIVE; } if (acc.nextByte() != matchStr.charAt(i)) { return MatchStrength.NO_MATCH; } } return fullMatchStrength; }
private final static MatchStrength tryMatch(InputAccessor acc, String matchStr, MatchStrength fullMatchStrength) throws IOException { for (int i = 0, len = matchStr.length(); i < len; ++i) { if (!acc.hasMoreBytes()) { return MatchStrength.INCONCLUSIVE; } if (acc.nextByte() != matchStr.charAt(i)) { return MatchStrength.NO_MATCH; } } return fullMatchStrength; }
private final static int skipSpace(InputAccessor acc, byte b) throws IOException { while (true) { int ch = (int) b & 0xFF; if (!(ch == ' ' || ch == '\r' || ch == '\n' || ch == '\t')) { return ch; } if (!acc.hasMoreBytes()) { return -1; } b = acc.nextByte(); ch = (int) b & 0xFF; } }
private final static int skipSpace(InputAccessor acc, byte b) throws IOException { while (true) { int ch = (int) b & 0xFF; if (!(ch == ' ' || ch == '\r' || ch == '\n' || ch == '\t')) { return ch; } if (!acc.hasMoreBytes()) { return -1; } b = acc.nextByte(); ch = (int) b & 0xFF; } }
private final static int skipSpace(InputAccessor acc, byte b) throws IOException { while (true) { int ch = (int) b & 0xFF; if (!(ch == ' ' || ch == '\r' || ch == '\n' || ch == '\t')) { return ch; } if (!acc.hasMoreBytes()) { return -1; } b = acc.nextByte(); ch = (int) b & 0xFF; } }
private final static int skipSpace(InputAccessor acc) throws IOException { if (!acc.hasMoreBytes()) { return -1; } return skipSpace(acc, acc.nextByte()); }
private final static int skipSpace(InputAccessor acc) throws IOException { if (!acc.hasMoreBytes()) { return -1; } return skipSpace(acc, acc.nextByte()); }
return MatchStrength.INCONCLUSIVE; byte b = acc.nextByte(); if (acc.nextByte() != UTF8_BOM_2) { return MatchStrength.NO_MATCH; if (acc.nextByte() != UTF8_BOM_3) { return MatchStrength.NO_MATCH; b = acc.nextByte(); b = acc.nextByte(); b = acc.nextByte(); if (b == BYTE_x) { if (maybeXmlDecl) { if (acc.hasMoreBytes() && acc.nextByte() == BYTE_m) { if (acc.hasMoreBytes() && acc.nextByte() == BYTE_l) { return MatchStrength.FULL_MATCH; b = acc.nextByte(); if (b == BYTE_HYPHEN) { if (!acc.hasMoreBytes()) { return MatchStrength.INCONCLUSIVE; if (acc.nextByte() == BYTE_HYPHEN) { return MatchStrength.SOLID_MATCH;
return MatchStrength.INCONCLUSIVE; byte b = acc.nextByte(); return MatchStrength.INCONCLUSIVE; if (acc.nextByte() != UTF8_BOM_2) { return MatchStrength.NO_MATCH; return MatchStrength.INCONCLUSIVE; if (acc.nextByte() != UTF8_BOM_3) { return MatchStrength.NO_MATCH; return MatchStrength.INCONCLUSIVE; b = acc.nextByte();
return MatchStrength.INCONCLUSIVE; byte b = acc.nextByte(); return MatchStrength.INCONCLUSIVE; if (acc.nextByte() != UTF8_BOM_2) { return MatchStrength.NO_MATCH; return MatchStrength.INCONCLUSIVE; if (acc.nextByte() != UTF8_BOM_3) { return MatchStrength.NO_MATCH; return MatchStrength.INCONCLUSIVE; b = acc.nextByte();