public class UnicodeBuilderValue extends UnicodeValue
Modifier and Type | Field and Description |
---|---|
protected boolean |
_isCopy |
static UnicodeBuilderValue |
EMPTY |
IS_DOUBLE, IS_LONG, IS_STRING, MIN_LENGTH
L, NULL_ARGS, NULL_VALUE_ARRAY
Constructor and Description |
---|
UnicodeBuilderValue() |
UnicodeBuilderValue(char ch) |
UnicodeBuilderValue(char[] buffer) |
UnicodeBuilderValue(char[] buffer,
int length) |
UnicodeBuilderValue(char[] buffer,
int offset,
int length) |
UnicodeBuilderValue(char[] s,
Value v1) |
UnicodeBuilderValue(java.lang.Character[] buffer) |
UnicodeBuilderValue(int capacity) |
UnicodeBuilderValue(java.lang.String s) |
UnicodeBuilderValue(StringBuilderValue v,
boolean isCopy) |
UnicodeBuilderValue(UnicodeBuilderValue v) |
UnicodeBuilderValue(Value v1) |
Modifier and Type | Method and Description |
---|---|
StringValue |
append(byte[] buf,
int offset,
int length)
Append a buffer to the value.
|
StringValue |
append(char v)
Append a Java char to the value.
|
StringValue |
append(char[] buf)
Append a Java double to the value.
|
StringValue |
append(char[] buf,
int offset,
int length)
Append a Java buffer to the value.
|
StringValue |
append(java.lang.CharSequence buf,
int head,
int tail)
Append a Java buffer to the value.
|
StringValue |
append(Env env,
StringValue unicodeStr,
java.lang.String charset) |
StringValue |
append(java.io.Reader reader,
long length)
Append from a read stream
|
StringValue |
append(java.lang.String s)
Append a Java string to the value.
|
StringValue |
append(java.lang.String s,
int start,
int end)
Append a Java string to the value.
|
StringValue |
append(UnicodeBuilderValue sb,
int head,
int tail)
Append a Java buffer to the value.
|
StringValue |
append(Value v)
Append a Java value to the value.
|
Value |
append(Value index,
Value value)
Sets the array ref.
|
StringValue |
appendByte(int v)
Append a Java byte to the value without conversions.
|
StringValue |
appendTo(UnicodeBuilderValue sb)
Append to a string builder.
|
char |
charAt(int index)
Returns the character at a particular location
|
Value |
charValueAt(long index)
Returns the character at an index
|
StringValue |
convertToUnicode(Env env,
java.lang.String charset)
Decodes from charset and returns UnicodeValue.
|
StringValue |
copyStringBuilder()
Converts to a string builder
|
static StringValue |
create(char value)
Creates the string.
|
StringValue |
create(Env env,
StringValue str,
java.lang.String charset)
Decodes the Unicode str from charset.
|
static Value |
create(java.lang.String value)
Creates a PHP string from a Java String.
|
StringValue |
createStringBuilder()
Creates a string builder of the same type.
|
StringValue |
createStringBuilder(int length)
Creates a string builder of the same type.
|
void |
ensureAppendCapacity(int newCapacity)
Ensure enough append capacity.
|
protected void |
ensureCapacity(int newCapacity) |
boolean |
eq(Value rValue)
Returns true for equality
|
boolean |
eql(Value o)
Returns true for equality
|
boolean |
equals(java.lang.Object o)
Test for equality
|
Value |
get(Value key)
Returns the character at an index
|
char[] |
getBuffer()
Returns the buffer.
|
int |
getBufferLength()
Returns the current capacity.
|
static int |
getNumericType(char[] buffer,
int offset,
int len) |
char[] |
getRawCharArray()
Return the underlying buffer.
|
java.lang.String |
getType()
Returns the type.
|
java.lang.String |
getValue()
Returns the value.
|
ValueType |
getValueType()
Returns the ValueType.
|
static ValueType |
getValueType(char[] buffer,
int offset,
int len) |
int |
hashCode()
Returns the hash code.
|
boolean |
isEmpty()
Returns true if the value is empty.
|
boolean |
isUnicode()
Returns true for UnicodeValue
|
int |
length()
Returns the length of the string.
|
void |
print(Env env)
Prints the value.
|
Value |
put(Value index,
Value value)
Sets the array ref.
|
void |
serialize(Env env,
java.lang.StringBuilder sb)
Serializes the value.
|
Value |
setCharValueAt(long indexL,
Value value)
sets the character at an index
|
void |
setLength(int length)
Sets the length.
|
java.lang.CharSequence |
subSequence(int start,
int end)
Returns a subsequence
|
StringValue |
toBinaryValue()
Converts to a BinaryValue.
|
StringValue |
toBinaryValue(Env env)
Converts to a BinaryValue.
|
StringValue |
toBinaryValue(java.lang.String charset)
Converts to a BinaryValue in desired charset.
|
boolean |
toBoolean()
Converts to a boolean.
|
byte[] |
toBytes()
Converts to a byte array, with no consideration of character encoding.
|
char[] |
toCharArray()
Returns a character array
|
double |
toDouble()
Converts to a double.
|
static double |
toDouble(char[] buffer,
int offset,
int len) |
Value |
toKey()
Converts to a key.
|
long |
toLong()
Converts to a long.
|
static long |
toLong(char[] buffer,
int offset,
int len)
Converts to a long.
|
StringValue |
toLowerCase(java.util.Locale locale)
Convert to lower case.
|
java.lang.String |
toString() |
StringValue |
toStringBuilder()
Converts to a string builder
|
StringValue |
toStringBuilder(Env env)
Converts to a string builder
|
StringValue |
toStringBuilder(Env env,
Value value)
Converts to a string builder
|
StringValue |
toUnicodeValue()
Converts to a UnicodeValue.
|
StringValue |
toUnicodeValue(Env env)
Converts to a UnicodeValue.
|
StringValue |
toUnicodeValue(Env env,
java.lang.String charset)
Converts to a UnicodeValue in desired charset.
|
StringValue |
toUpperCase()
Convert to lower case.
|
toDebugString, toInputStream, toReader, toString, toUnicodeValueMarshalCost, varDumpImpl
add, append, append, append, append, append, append, append, append, appendBytes, appendBytes, appendBytes, appendBytes, appendRead, appendRead, appendReadAll, appendReadAll, appendReadAll, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUtf8, appendUtf8, bitAnd, bitOr, bitXor, cmp, cmpString, create, endsWith, equalsIgnoreCase, equalsString, equalsStringIgnoreCase, generate, getArg, getChars, getCrc32Value, getOutputStream, hashCodeCaseInsensitive, increment, indexOf, indexOf, indexOf, indexOf, intern, isCallable, isDoubleConvertible, isLongConvertible, isNumber, isNumeric, isScalar, isset, isString, jsonEncode, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, putThisFieldArray, regionMatches, regionMatches, regionMatchesIgnoreCase, startsWith, stringSubstring, sub, substring, substring, toAutoArray, toAutoObject, toBinaryValueMarshalCost, toByteMarshalCost, toCallable, toCharArrayMarshalCost, toCharMarshalCost, toDouble, toDoubleMarshalCost, toFloatMarshalCost, toIntegerMarshalCost, toJavaObject, toLong, toLongMarshalCost, toLowerCase, toShortMarshalCost, toSimpleReader, toStringMarshalCost, toStringValue, toStringValue, toStringValueMarshalCost, toUnicode, toUpperCase, valuesToArray, varExportImpl, write, write, writeTo
abs, add, addOne, appendTo, appendTo, appendTo, call, call, call, call, call, call, call, callCopy, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callRef, callRef, callRef, callRef, callRef, callRef, callRef, checkPrivate, checkProtected, clone, containsKey, copy, copy, copy, copyArrayItem, copyReturn, copySaveFunArg, copyTree, current, div, div, end, eqValue, findFunction, findQuercusClass, geq, get, getArgTail, getArray, getArray, getBaseIterator, getCallableName, getCalledClass, getClassName, getCount, getCountRecursive, getDirty, getField, getFieldArg, getFieldArgRef, getFieldArray, getFieldObject, getFieldVar, getHashCode, getIterator, getKeyArray, getKeyIterator, getObject, getObject, getObjectHash, getQuercusClass, getRef, getResourceType, getSize, getStaticFieldValue, getStaticFieldVar, getThisField, getThisFieldArg, getThisFieldArgRef, getThisFieldArray, getThisFieldObject, getThisFieldVar, getValueArray, getValueIterator, getVar, gt, hasCurrent, initField, initField, initField, initIncompleteField, isA, isA, isArray, isBinary, isBoolean, isDefault, isDouble, isEmpty, isFieldExists, isFieldInit, isLong, isNull, isNumberConvertible, isObject, isResource, isset, issetField, issetThisField, isVar, key, keyExists, leq, lshift, lt, mod, mul, mul, neg, next, nextIndex, pop, pos, postdecr, postincr, postincr, predecr, preincr, preincr, prev, print, printDepth, printJavaChar, printJavaString, printR, printRImpl, put, put, putArray, putField, putField, putField, putObject, putThisField, putThisField, putVar, remove, reset, rshift, serialize, set, setFieldInit, setJavaObject, setStaticFieldRef, shuffle, sub_rev, sub, subOne, toArgRef, toArray, toArrayValue, toBigDecimal, toBigInteger, toBooleanMarshalCost, toByteArrayMarshalCost, toChar, toDouble, toDouble, toDouble, toDouble, toDoubleValue, toException, toInt, toInternString, toJavaBoolean, toJavaByte, toJavaCalendar, toJavaCharacter, toJavaCollection, toJavaDate, toJavaDouble, toJavaEnum, toJavaFloat, toJavaInteger, toJavaList, toJavaLong, toJavaMap, toJavaObject, toJavaObjectMarshalCost, toJavaObjectNotNull, toJavaShort, toJavaString, toJavaURL, toLocalRef, toLocalThis, toLocalValue, toLocalValueReadOnly, toLocalVar, toLocalVarDeclAsRef, toLong, toLong, toLong, toLong, toLongValue, toObject, toRef, toRefValue, toString, toStringBuilder, toValue, toVar, unsetArray, unsetField, unsetThisArray, unsetThisField, unsetThisPrivateField, varDump, varExport
public static final UnicodeBuilderValue EMPTY
protected boolean _isCopy
public UnicodeBuilderValue()
public UnicodeBuilderValue(int capacity)
public UnicodeBuilderValue(java.lang.String s)
public UnicodeBuilderValue(char[] buffer, int offset, int length)
public UnicodeBuilderValue(char[] buffer)
public UnicodeBuilderValue(char[] buffer, int length)
public UnicodeBuilderValue(java.lang.Character[] buffer)
public UnicodeBuilderValue(char ch)
public UnicodeBuilderValue(char[] s, Value v1)
public UnicodeBuilderValue(Value v1)
public UnicodeBuilderValue(UnicodeBuilderValue v)
public UnicodeBuilderValue(StringBuilderValue v, boolean isCopy)
public static StringValue create(char value)
public static Value create(java.lang.String value)
public StringValue create(Env env, StringValue str, java.lang.String charset)
create
in class StringValue
str
- should be a Unicode stringcharset
- to decode string frompublic final StringValue convertToUnicode(Env env, java.lang.String charset)
convertToUnicode
in class StringValue
env
- charset
- public final boolean isUnicode()
isUnicode
in class UnicodeValue
public final java.lang.String getValue()
public java.lang.String getType()
getType
in class StringValue
public ValueType getValueType()
getValueType
in class StringValue
public StringValue toStringBuilder()
toStringBuilder
in class UnicodeValue
public StringValue toStringBuilder(Env env)
toStringBuilder
in class StringValue
public StringValue toStringBuilder(Env env, Value value)
toStringBuilder
in class Value
public StringValue copyStringBuilder()
copyStringBuilder
in class Value
public final StringValue toUnicodeValue()
toUnicodeValue
in class UnicodeValue
public final StringValue toUnicodeValue(Env env)
toUnicodeValue
in class UnicodeValue
public final StringValue toUnicodeValue(Env env, java.lang.String charset)
toUnicodeValue
in class UnicodeValue
public final StringValue append(byte[] buf, int offset, int length)
append
in class StringValue
public StringValue append(Value v)
append
in class StringValue
public StringValue append(java.lang.String s)
append
in class StringValue
public StringValue append(java.lang.String s, int start, int end)
append
in class StringValue
public StringValue append(char v)
append
in class StringValue
public StringValue append(char[] buf, int offset, int length)
append
in class StringValue
public StringValue append(char[] buf)
append
in class StringValue
public StringValue append(java.lang.CharSequence buf, int head, int tail)
append
in class StringValue
public StringValue append(UnicodeBuilderValue sb, int head, int tail)
append
in class StringValue
public StringValue append(Env env, StringValue unicodeStr, java.lang.String charset)
append
in class StringValue
public StringValue appendTo(UnicodeBuilderValue sb)
appendTo
in class StringValue
public StringValue append(java.io.Reader reader, long length) throws java.io.IOException
StringValue
append
in class StringValue
java.io.IOException
public StringValue appendByte(int v)
appendByte
in class StringValue
public final boolean isEmpty()
isEmpty
in class StringValue
public Value toKey()
toKey
in class StringValue
public final byte[] toBytes()
toBytes
in class StringValue
public final Value get(Value key)
get
in class StringValue
public Value append(Value index, Value value)
append
in class StringValue
public final char[] getBuffer()
public final void setLength(int length)
setLength
in class StringValue
public final int getBufferLength()
public StringValue toBinaryValue()
toBinaryValue
in class Value
public StringValue toBinaryValue(Env env)
toBinaryValue
in class Value
public StringValue toBinaryValue(java.lang.String charset)
toBinaryValue
in class Value
env
- charset
- public Value charValueAt(long index)
charValueAt
in class StringValue
public Value setCharValueAt(long indexL, Value value)
setCharValueAt
in class StringValue
public final int length()
length
in interface java.lang.CharSequence
length
in class StringValue
public char charAt(int index)
charAt
in interface java.lang.CharSequence
charAt
in class StringValue
public java.lang.CharSequence subSequence(int start, int end)
subSequence
in interface java.lang.CharSequence
subSequence
in class StringValue
public StringValue toLowerCase(java.util.Locale locale)
toLowerCase
in class StringValue
public StringValue toUpperCase()
toUpperCase
in class StringValue
public char[] toCharArray()
toCharArray
in class StringValue
public char[] getRawCharArray()
getRawCharArray
in class StringValue
public void print(Env env)
public void serialize(Env env, java.lang.StringBuilder sb)
serialize
in class StringValue
public StringValue createStringBuilder()
createStringBuilder
in class StringValue
public StringValue createStringBuilder(int length)
createStringBuilder
in class StringValue
public static int getNumericType(char[] buffer, int offset, int len)
public static ValueType getValueType(char[] buffer, int offset, int len)
public final boolean toBoolean()
toBoolean
in class StringValue
public static long toLong(char[] buffer, int offset, int len)
public double toDouble()
toDouble
in class StringValue
public static double toDouble(char[] buffer, int offset, int len)
public void ensureAppendCapacity(int newCapacity)
StringValue
ensureAppendCapacity
in class StringValue
protected void ensureCapacity(int newCapacity)
public int hashCode()
hashCode
in class StringValue
public boolean eq(Value rValue)
eq
in class StringValue
public boolean equals(java.lang.Object o)
StringValue
equals
in class StringValue
public java.lang.String toString()
toString
in interface java.lang.CharSequence
toString
in class java.lang.Object