Class CharWName


  • final class CharWName
    extends WName
    This class is similar to PName, in that it implements an efficient representation of prefixed names, but one used on output (Writer) side.

    Note: unlike with Reader-side prefixed names, here we can not assume that components are intern()ed.

    • Field Detail

      • _chars

        final char[] _chars
    • Constructor Detail

      • CharWName

        public CharWName​(java.lang.String localName)
      • CharWName

        public CharWName​(java.lang.String prefix,
                         java.lang.String localName)
    • Method Detail

      • serializedLength

        public final int serializedLength()
        Specified by:
        serializedLength in class WName
        Returns:
        Length of full (qualified) name, in native serialization units (bytes or characters)
      • appendBytes

        public int appendBytes​(byte[] buffer,
                               int offset)
        Specified by:
        appendBytes in class WName
      • writeBytes

        public void writeBytes​(java.io.OutputStream out)
                        throws java.io.IOException
        Specified by:
        writeBytes in class WName
        Throws:
        java.io.IOException
      • appendChars

        public int appendChars​(char[] buffer,
                               int offset)
        Specified by:
        appendChars in class WName
      • writeChars

        public void writeChars​(java.io.Writer w)
                        throws java.io.IOException
        Specified by:
        writeChars in class WName
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class WName