Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexer
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20594/lexer
Modified Files:
Page.java
Log Message:
DocComment fix and another getText() signature.
Index: Page.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexer/Page.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** Page.java 23 May 2004 19:42:14 -0000 1.36
--- Page.java 8 Jun 2004 10:20:18 -0000 1.37
***************
*** 949,952 ****
--- 949,979 ----
/**
+ * Put the text identified by the given limits into the given array at the specified offset.
+ * @param array The array of characters.
+ * @param offset The starting position in the array where characters are to be placed.
+ * @param start The starting position, zero based.
+ * @param end The ending position
+ * (exclusive, i.e. the character at the ending position is not included),
+ * zero based.
+ * @exception IllegalArgumentException If an attempt is made to get
+ * characters ahead of the current source offset (character position).
+ */
+ public void getText (char[] array, int offset, int start, int end)
+ {
+ int length;
+
+ if ((mSource.mOffset < start) || (mSource.mOffset < end))
+ throw new IllegalArgumentException ("attempt to extract future characters from source");
+ if (end < start)
+ {
+ length = end;
+ end = start;
+ start = length;
+ }
+ length = end - start;
+ System.arraycopy (mSource.mBuffer, start, array, offset, length);
+ }
+
+ /**
* Get the text line the position of the cursor lies on.
* @param cursor The position to calculate for.
|