Package org.apache.xpath.objects
Class XMLStringFactoryImpl
java.lang.Object
org.apache.xml.utils.XMLStringFactory
org.apache.xpath.objects.XMLStringFactoryImpl
public class XMLStringFactoryImpl extends XMLStringFactory
Class XMLStringFactoryImpl creates XString versions of XMLStrings.
-
Constructor Summary
Constructors Constructor Description XMLStringFactoryImpl() -
Method Summary
Modifier and Type Method Description XMLStringemptystr()Get a cheap representation of an empty string.static XMLStringFactorygetFactory()Get the XMLStringFactory to pass to DTM construction.XMLStringnewstr(char[] string, int start, int length)Create a XMLString from a FastStringBuffer.XMLStringnewstr(String string)Create a new XMLString from a Java string.XMLStringnewstr(FastStringBuffer fsb, int start, int length)Create a XMLString from a FastStringBuffer.
-
Constructor Details
-
XMLStringFactoryImpl
public XMLStringFactoryImpl()
-
-
Method Details
-
getFactory
Get the XMLStringFactory to pass to DTM construction.- Returns:
- A never-null static reference to a String factory.
-
newstr
Create a new XMLString from a Java string.- Specified by:
newstrin classXMLStringFactory- Parameters:
string- Java String reference, which must be non-null.- Returns:
- An XMLString object that wraps the String reference.
-
newstr
Create a XMLString from a FastStringBuffer.- Specified by:
newstrin classXMLStringFactory- Parameters:
fsb- FastStringBuffer reference, which must be non-null.start- The start position in the array.length- The number of characters to read from the array.- Returns:
- An XMLString object that wraps the FastStringBuffer reference.
-
newstr
Create a XMLString from a FastStringBuffer.- Specified by:
newstrin classXMLStringFactory- Parameters:
string- FastStringBuffer reference, which must be non-null.start- The start position in the array.length- The number of characters to read from the array.- Returns:
- An XMLString object that wraps the FastStringBuffer reference.
-
emptystr
Get a cheap representation of an empty string.- Specified by:
emptystrin classXMLStringFactory- Returns:
- An non-null reference to an XMLString that represents "".
-