protected JavaTokenizer(ScannerFactory fac, char[] buf, int inputLength) { this(fac, new UnicodeReader(fac, buf, inputLength)); }
/** * Create a scanner from the input array. This method might * modify the array. To avoid copying the input array, ensure * that {@code inputLength < input.length} or * {@code input[input.length -1]} is a white space character. * * @param fac the factory which created this Scanner * @param buf the input, might be modified * Must be positive and less than or equal to input.length. */ protected JavaTokenizer(ScannerFactory fac, CharBuffer buf) { this(fac, new UnicodeReader(fac, buf)); }
/** * Create a scanner from the input array. This method might * modify the array. To avoid copying the input array, ensure * that {@code inputLength < input.length} or * {@code input[input.length -1]} is a white space character. * * @param fac the factory which created this Scanner * @param buf the input, might be modified * Must be positive and less than or equal to input.length. */ protected JavaTokenizer(ScannerFactory fac, CharBuffer buf) { this(fac, new UnicodeReader(fac, buf)); }
protected JavaTokenizer(ScannerFactory fac, char[] buf, int inputLength) { this(fac, new UnicodeReader(fac, buf, inputLength)); }
/** * Called when a complete comment has been scanned. pos and endPos * will mark the comment boundary. */ protected Tokens.Comment processComment(int pos, int endPos, CommentStyle style) { if (scannerDebug) System.out.println("processComment(" + pos + "," + endPos + "," + style + ")=|" + new String(reader.getRawCharacters(pos, endPos)) + "|"); char[] buf = reader.getRawCharacters(pos, endPos); return new BasicComment<UnicodeReader>(new UnicodeReader(fac, buf, buf.length), style); }
/** * Called when a complete comment has been scanned. pos and endPos * will mark the comment boundary. */ protected Tokens.Comment processComment(int pos, int endPos, CommentStyle style) { if (scannerDebug) System.out.println("processComment(" + pos + "," + endPos + "," + style + ")=|" + new String(reader.getRawCharacters(pos, endPos)) + "|"); char[] buf = reader.getRawCharacters(pos, endPos); return new BasicComment<UnicodeReader>(new UnicodeReader(fac, buf, buf.length), style); }