net.sf.saxon.tinytree
public class CompressedWhitespace extends Object implements CharSequence
Constructor Summary | |
---|---|
CompressedWhitespace(long compressedValue) |
Method Summary | |
---|---|
char | charAt(int index)
Returns the char value at the specified index. |
static CharSequence | compress(CharSequence in)
Attempt to compress a CharSequence |
boolean | equals(Object obj)
Indicates whether some other object is "equal to" this one. |
long | getCompressedValue() |
int | hashCode()
Returns a hash code value for the object. |
int | length() |
CharSequence | subSequence(int start, int end)
Returns a new CharSequence that is a subsequence of this sequence.
|
String | toString()
Returns a string representation of the object. |
FastStringBuffer | uncompress(FastStringBuffer buffer)
Uncompress the whitespace to a FastStringBuffer |
static void | uncompress(long value, FastStringBuffer buffer) |
void | write(Writer writer)
Write the value to a Writer |
void | writeEscape(boolean[] specialChars, Writer writer)
Write the value to a Writer with escaping of special characters |
void | writeEscape(boolean[] specialChars, OutputStream stream)
Write the value to a UTF-8 OutputStream with escaping of special characters |
char
value at the specified index. An index ranges from zero
to length() - 1. The first char
value of the sequence is at
index zero, the next at index one, and so on, as for array
indexing.
If the char
value specified by the index is a
surrogate, the surrogate
value is returned.
Parameters: index the index of the char
value to be returned
Returns: the specified char
value
Throws: IndexOutOfBoundsException if the index argument is negative or not less than length()
Parameters: in the CharSequence to be compressed
Returns: the compressed sequence if it can be compressed; or the original CharSequence otherwise
CharSequence
that is a subsequence of this sequence.
The subsequence starts with the char
value at the specified index and
ends with the char
value at index end - 1. The length
(in char
s) of the
returned sequence is end - start, so if start == end
then an empty sequence is returned.
Parameters: start the start index, inclusive end the end index, exclusive
Returns: the specified subsequence
Throws: IndexOutOfBoundsException if start or end are negative, if end is greater than length(), or if start is greater than end
Parameters: buffer the buffer to which the whitespace is to be appended. The parameter may be null, in which case a new buffer is created.
Returns: the FastStringBuffer to which the whitespace has been appended. If a buffer was supplied in the argument, this will be the same buffer.
Parameters: specialChars array of booleans indicating which characters need to be XML-escaped stream the output stream to write to