Package org.apache.xml.utils
Class XMLStringFactoryDefault
java.lang.Object
org.apache.xml.utils.XMLStringFactory
org.apache.xml.utils.XMLStringFactoryDefault
The default implementation of XMLStringFactory.
This implementation creates XMLStringDefault objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionemptystr()
Get a cheap representation of an empty string.newstr
(char[] string, int start, int length) Create a XMLString from a FastStringBuffer.Create a new XMLString from a Java string.newstr
(FastStringBuffer fsb, int start, int length) Create a XMLString from a FastStringBuffer.
-
Constructor Details
-
XMLStringFactoryDefault
public XMLStringFactoryDefault()
-
-
Method Details
-
newstr
Create a new XMLString from a Java string.- Specified by:
newstr
in 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:
newstr
in 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:
newstr
in 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:
emptystr
in classXMLStringFactory
- Returns:
- An non-null reference to an XMLString that represents "".
-