Class: com.sun.xml.internal.bind.v2.runtime.output.Pcdata
- public abstract class Pcdata
- implements CharSequence
This class is used inside the marshaller/unmarshaller to send/receive text data.
On top of CharSequence, this class has an ability to write itself to the com.sun.xml.internal.bind.v2.runtime.output.XmlOutput. This allows the implementation to choose the most efficient way possible when writing to XML (for example, it can skip the escaping of buffer copying.) TODO: visitor pattern support?
Inheritance
Superclass tree:- java.lang.Object
- com.sun.xml.internal.bind.v2.runtime.output.Pcdata
Methods
-
Pcdatatop
public Pcdata() -
toStringtop
public abstract String toString()Returns a string containing the characters in this sequence in the same order as this sequence. The length of the string will be the length of this sequence.- Specified by:
- toString from CharSequence
-
writeTotop
public abstract void writeTo(UTF8XmlOutput output) throws IOExceptionWrites itself to com.sun.xml.internal.bind.v2.runtime.output.UTF8XmlOutput.This is the most performance critical path for the marshaller, so it warrants its own method.
-
writeTotop
public void writeTo(char[] buf, int start)Writes itself to the character array.This method is used by most other com.sun.xml.internal.bind.v2.runtime.output.XmlOutput. The default implementation involves in one extra char[] copying.
The caller must provide a big enough buffer that can hold enough characters returned by the CharSequence.length() method.
