Package com.fasterxml.aalto.out
Class WName
java.lang.Object
com.fasterxml.aalto.out.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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intappendBytes(byte[] buffer, int offset) abstract intappendChars(char[] buffer, int offset) final booleanfinal Stringfinal Stringfinal StringinthashCode()Whether we should use internal hash, or the hash of prefixed name string itself is an open question.final booleanfinal booleanfinal booleanabstract inttoString()abstract voidwriteBytes(OutputStream out) abstract voidwriteChars(Writer w)
-
Field Details
-
_prefix
-
_localName
-
-
Constructor Details
-
WName
-
WName
-
-
Method Details
-
serializedLength
public abstract int serializedLength()- Returns:
- Length of full (qualified) name, in native serialization units (bytes or characters)
-
getPrefix
-
getPrefixedName
-
getLocalName
-
hasPrefix
public final boolean hasPrefix() -
appendBytes
public abstract int appendBytes(byte[] buffer, int offset) -
writeBytes
- Throws:
IOException
-
appendChars
public abstract int appendChars(char[] buffer, int offset) -
writeChars
- Throws:
IOException
-
toString
-
equals
-
hashCode
public int hashCode()Whether we should use internal hash, or the hash of prefixed name string itself is an open question. For now, let's use former. -
hasName
-
hasName
-