Top Description Constructors Methods
org.glassfish.jaxb.runtime.v2.runtime.output

public abstract Class Pcdata

extends Object
implements CharSequence
Class Inheritance
All Implemented Interfaces
java.lang.CharSequence
Known Direct Subclasses
org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Base64Data, org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.IntArrayData, org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.IntData
Imports
java.io.IOException

Text data in XML.

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 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?

Author
Kohsuke Kawaguchi

Constructor Summary

AccessConstructor and Description
protected
Pcdata()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public abstract String
toString()

Redeclares java.lang.CharSequence.toString.

Overrides java.lang.Object.toString.

Returns a string containing the characters in this sequence in the same order as this sequence.

public abstract void
writeTo(UTF8XmlOutput output)

Writes itself to UTF8XmlOutput.

public void
writeTo(char[] buf, int start)

Writes itself to the character array.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Constructor Detail

Pcdataback to summary
protected Pcdata()

Default constructor.

Method Detail

toStringback to summary
public abstract String toString()

Redeclares java.lang.CharSequence.toString.

Overrides java.lang.Object.toString.

Doc from java.lang.CharSequence.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.

Annotations
@Override
writeToback to summary
public abstract void writeTo(UTF8XmlOutput output) throws IOException

Writes itself to UTF8XmlOutput.

This is the most performance critical path for the marshaller, so it warrants its own method.

writeToback to summary
public void writeTo(char[] buf, int start)

Writes itself to the character array.

This method is used by most other 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 length() method.