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 int
appendBytes
(byte[] buffer, int offset) abstract int
appendChars
(char[] buffer, int offset) final boolean
final String
final String
final String
int
hashCode()
Whether we should use internal hash, or the hash of prefixed name string itself is an open question.final boolean
final boolean
final boolean
abstract int
toString()
abstract void
writeBytes
(OutputStream out) abstract void
writeChars
(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
-