Class is final for performance reasons and since this is not designed to be extensible or customizable (customizations would occur in calling code)
| Modifier and Type | Field and Description |
|---|---|
| protected transient String | _jdkSerializeValue
Ugly hack, to work through the requirement that _value is indeed final, and that JDK serialization won't call ctor(s). |
| protected char[] | |
| protected byte[] | |
| protected byte[] | |
| protected final String | |
| private static final JsonStringEncoder | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | appendQuoted(char[]
Buffer to append JSON-escaped String into buffer, int Offset in offset)buffer to append String atImplements com. |
| public int | appendQuotedUTF8(byte[]
Buffer to append JSON-escaped String into buffer, int Offset in offset)buffer to append String atImplements com. |
| public int | appendUnquoted(char[]
Buffer to append literal (unescaped) String into buffer, int Offset in offset)buffer to append String atImplements com. |
| public int | appendUnquotedUTF8(byte[]
Buffer to append literal (unescaped) String into buffer, int Offset in offset)buffer to append String atImplements com. |
| public final char[] | asQuotedChars()
Implements com. |
| public final byte[] | asQuotedUTF8()
Implements com. |
| public final byte[] | asUnquotedUTF8()
Implements com. |
| public final int | charLength()
Implements com. |
| public final boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public final String | getValue()
Implements com. |
| public final int | |
| public int | putQuotedUTF8(ByteBuffer
java. to append String intoImplements com. java., if it fits.
|
| public int | putUnquotedUTF8(ByteBuffer
java. to append String intoImplements com. java., if it fits.
|
| private void | |
| protected Object | |
| public final String | |
| private void | |
| public int | writeQuotedUTF8(OutputStream
java. to write String intoImplements com. java..
|
| public int | writeUnquotedUTF8(OutputStream
java. to write String intoImplements com. java..
|
| _jdkSerializeValue | back to summary |
|---|---|
| protected transient String _jdkSerializeValue Ugly hack, to work through the requirement that _value is indeed final, and that JDK serialization won't call ctor(s).
| |
| _quotedChars | back to summary |
|---|---|
| protected char[] _quotedChars | |
| _quotedUTF8Ref | back to summary |
|---|---|
| protected byte[] _quotedUTF8Ref | |
| _unquotedUTF8Ref | back to summary |
|---|---|
| protected byte[] _unquotedUTF8Ref | |
| _value | back to summary |
|---|---|
| protected final String _value | |
| JSON_ENCODER | back to summary |
|---|---|
| private static final JsonStringEncoder JSON_ENCODER | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SerializedString | back to summary |
|---|---|
| public SerializedString(String v) | |
| appendQuoted | back to summary |
|---|---|
| public int appendQuoted(char[] buffer, int offset) Implements com. Doc from com. Method that will append quoted characters of this String into given buffer. Functionally equivalent to: char[] ch = str.asQuotedChars(); System.arraycopy(ch, 0, buffer, offset, ch.length); return ch.length;
| |
| appendQuotedUTF8 | back to summary |
|---|---|
| public int appendQuotedUTF8(byte[] buffer, int offset) Implements com. Doc from com. Method that will append quoted UTF-8 bytes of this String into given buffer, if there is enough room; if not, returns -1. Functionally equivalent to: byte[] bytes = str.asQuotedUTF8(); System.arraycopy(bytes, 0, buffer, offset, bytes.length); return bytes.length;
| |
| appendUnquoted | back to summary |
|---|---|
| public int appendUnquoted(char[] buffer, int offset) Implements com. Doc from com. Method that will append unquoted characters of this String into given buffer. Functionally equivalent to: char[] ch = str.getValue().toCharArray(); System.arraycopy(bytes, 0, buffer, offset, ch.length); return ch.length;
| |
| appendUnquotedUTF8 | back to summary |
|---|---|
| public int appendUnquotedUTF8(byte[] buffer, int offset) Implements com. Doc from com. Method that will append unquoted ('raw') UTF-8 bytes of this String into given buffer. Functionally equivalent to: byte[] bytes = str.asUnquotedUTF8(); System.arraycopy(bytes, 0, buffer, offset, bytes.length); return bytes.length;
| |
| asQuotedChars | back to summary |
|---|---|
| public final char[] asQuotedChars() Implements com. Accessor for accessing value that has been quoted (escaped) using JSON quoting rules (using backslash-prefixed codes) into a char array.
| |
| asQuotedUTF8 | back to summary |
|---|---|
| public final byte[] asQuotedUTF8() Implements com. Accessor for accessing value that has been quoted (escaped) using JSON quoting rules (using backslash-prefixed codes), and encoded using UTF-8 encoding into a byte array.
| |
| asUnquotedUTF8 | back to summary |
|---|---|
| public final byte[] asUnquotedUTF8() Implements com. Accessor for accessing value as is (without JSON quoting (ecaping)) encoded as UTF-8 byte array.
| |
| charLength | back to summary |
|---|---|
| public final int charLength() Implements com. Returns length of the String as characters
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getValue | back to summary |
|---|---|
| public final String getValue() Implements com. Doc from com. Returns unquoted String that this object represents (and offers serialized forms for) | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| putQuotedUTF8 | back to summary |
|---|---|
| public int putQuotedUTF8(ByteBuffer buffer) Implements com. Doc from com. Method for appending JSON-escaped UTF-8 encoded String value into given
| |
| putUnquotedUTF8 | back to summary |
|---|---|
| public int putUnquotedUTF8(ByteBuffer buffer) Implements com. Doc from com. Method for appending unquoted ('raw') UTF-8 encoded String value into given
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream in) throws IOException | |
| readResolve | back to summary |
|---|---|
| protected Object readResolve() | |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream out) throws IOException | |
| writeQuotedUTF8 | back to summary |
|---|---|
| public int writeQuotedUTF8(OutputStream out) throws IOException Implements com. Doc from com. Method for writing JSON-escaped UTF-8 encoded String value using given
| |
| writeUnquotedUTF8 | back to summary |
|---|---|
| public int writeUnquotedUTF8(OutputStream out) throws IOException Implements com. Doc from com. Method for writing unescaped UTF-8 encoded String value using given
| |