|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnu.validator.htmlparser.impl.UTF16Buffer
public final class UTF16Buffer
An UTF-16 buffer that knows the start and end indeces of its unconsumed content.
Constructor Summary | |
---|---|
UTF16Buffer(char[] buffer,
int start,
int end)
Constructor for wrapping an existing UTF-16 code unit array. |
Method Summary | |
---|---|
void |
adjust(boolean lastWasCR)
Adjusts the start index to skip over the first character if it is a line feed and the previous character was a carriage return. |
char[] |
getBuffer()
Returns the backing buffer. |
int |
getEnd()
Returns the end index. |
int |
getStart()
Returns the start index. |
boolean |
hasMore()
Checks if the buffer has data left. |
void |
setEnd(int end)
Sets the end index. |
void |
setStart(int start)
Sets the start index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UTF16Buffer(char[] buffer, int start, int end)
buffer
- the backing bufferstart
- the index of the first character to consumeend
- the index immediately after the last character to consumeMethod Detail |
---|
public int getStart()
public void setStart(int start)
start
- the start indexpublic char[] getBuffer()
public int getEnd()
public boolean hasMore()
true
if there's data leftpublic void adjust(boolean lastWasCR)
lastWasCR
- whether the previous character was a carriage returnpublic void setEnd(int end)
end
- the end index
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |