public class StringBuilderValue extends BinaryValue
| Modifier and Type | Field and Description |
|---|---|
static StringBuilderValue |
EMPTY |
IS_DOUBLE, IS_LONG, IS_STRING, MIN_LENGTHL, NULL_ARGS, NULL_VALUE_ARRAY| Constructor and Description |
|---|
StringBuilderValue() |
StringBuilderValue(byte ch) |
StringBuilderValue(byte[] buffer) |
StringBuilderValue(byte[] buffer,
int offset,
int length) |
StringBuilderValue(byte[] s,
Value v1) |
StringBuilderValue(char ch) |
StringBuilderValue(char[] s) |
StringBuilderValue(char[] buffer,
int length)
Creates a new StringBuilderValue with the buffer without copying.
|
StringBuilderValue(char[] buffer,
int offset,
int length) |
StringBuilderValue(char[] s,
Value v1) |
StringBuilderValue(int capacity) |
StringBuilderValue(int capacity,
boolean isAbsolute) |
StringBuilderValue(java.lang.String s) |
StringBuilderValue(StringBuilderValue v) |
StringBuilderValue(Value v1) |
StringBuilderValue(Value v1,
Value v2) |
StringBuilderValue(Value v1,
Value v2,
Value v3) |
| Modifier and Type | Method and Description |
|---|---|
StringValue |
append(boolean v)
Append a Java boolean to the value.
|
StringValue |
append(byte[] buf)
Append a double to the value.
|
StringValue |
append(byte[] buf,
int offset,
int length)
Append a buffer to the value.
|
StringValue |
append(char ch)
Append a Java char to the value.
|
StringValue |
append(char[] buf)
Append a Java buffer 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(double v)
Append a Java double to the value.
|
StringValue |
append(long v)
Append a Java long to the value.
|
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(StringBuilderValue sb,
int head,
int tail)
Append a Java buffer to the value.
|
StringValue |
append(java.lang.String s,
int start,
int end)
Append a Java string 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 |
appendBytes(byte[] bytes,
int offset,
int end)
Append Java bytes to the value without conversions.
|
StringValue |
appendBytes(java.lang.String s)
Append a bytes to the value.
|
StringValue |
appendTo(BinaryBuilderValue bb)
Append to a string builder.
|
StringValue |
appendTo(LargeStringBuilderValue bb)
Append to a string builder.
|
StringValue |
appendTo(StringBuilderValue bb)
Append to a string builder.
|
StringValue |
appendTo(UnicodeBuilderValue bb)
Append to a string builder.
|
StringValue |
appendUnicode(char[] buf)
Append a Java buffer to the value.
|
StringValue |
appendUnicode(char[] buf,
int offset,
int length)
Append a Java buffer to the value.
|
StringValue |
appendUnicode(Value v)
Append a Java value to the value.
|
StringValue |
appendUnicode(Value v1,
Value v2)
Append a Java value to the value.
|
StringValue |
appendUtf8(byte[] buf,
int offset,
int length)
Append a buffer to the value.
|
char |
charAt(int index)
Returns the character at a particular location
|
Value |
charValueAt(long index)
Returns the character at an index
|
StringValue |
copyStringBuilder()
Converts to a string builder
|
static StringValue |
create(byte value)
Creates the string.
|
static StringValue |
create(char value)
Creates the string.
|
static Value |
create(java.lang.String value)
Creates a PHP string from a Java String.
|
StringBuilderValue |
createStringBuilder()
Creates a string builder of the same type.
|
StringBuilderValue |
createStringBuilder(byte[] buffer,
int offset,
int length)
Creates a string builder of the same type.
|
StringBuilderValue |
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
|
boolean |
equalsIgnoreCase(java.lang.Object o)
Test for equality
|
void |
generate(java.io.PrintWriter out)
Generates code to recreate the expression.
|
Value |
get(Value key)
Returns the character at an index
|
byte[] |
getBuffer()
Returns the buffer.
|
int |
getBufferLength()
Returns the current capacity.
|
long |
getCrc32Value()
Calculates CRC32 value.
|
int |
getHashCode() |
java.io.OutputStream |
getOutputStream()
Returns an OutputStream.
|
java.lang.String |
getType()
Returns the type.
|
java.lang.String |
getValue()
Returns the value.
|
ValueType |
getValueType()
Returns the ValueType.
|
static ValueType |
getValueType(byte[] buffer,
int offset,
int len) |
int |
hashCode()
Returns the hash code.
|
int |
hashCodeCaseInsensitive()
Returns the hash code.
|
int |
indexOf(char match)
Returns the first index of the match string, starting from the head.
|
int |
indexOf(char match,
int head)
Returns the last index of the match string, starting from the head.
|
int |
indexOf(java.lang.CharSequence match,
int head)
Returns the first index of the match string, starting from the head.
|
boolean |
isEmpty()
Returns true if the value is empty.
|
boolean |
isScalar()
Returns true for a scalar
|
boolean |
isset(Value indexV)
Return true if the array value is set
|
int |
length()
Returns the length of the string.
|
void |
print(Env env)
Prints the value.
|
void |
print(Env env,
WriteStream out)
Prints the value.
|
Value |
put(Value index,
Value value)
Sets the array ref.
|
boolean |
regionMatches(int offset,
char[] mBuffer,
int mOffset,
int mLength)
Returns true if the region matches
|
boolean |
regionMatchesIgnoreCase(int offset,
char[] mBuffer,
int mOffset,
int mLength)
Returns true if the region matches
|
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 offset)
Sets the length.
|
java.lang.String |
stringSubstring(int start,
int end)
Returns a subsequence
|
java.lang.CharSequence |
subSequence(int start,
int end)
Returns a subsequence
|
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.
|
java.lang.String |
toDebugString() |
double |
toDouble()
Converts to a double.
|
static double |
toDouble(byte[] buffer,
int offset,
int len) |
java.io.InputStream |
toInputStream()
Convert to an input stream.
|
java.lang.Object |
toJavaObject()
Converts to an object.
|
Value |
toKey()
Converts to a key.
|
long |
toLong()
Converts to a long.
|
StringValue |
toLowerCase(java.util.Locale locale)
Convert to lower case.
|
java.lang.String |
toString()
Converts to a string.
|
StringValue |
toStringBuilder()
Converts to a string builder
|
StringValue |
toStringBuilder(Env env)
Converts to a string builder
|
StringValue |
toStringBuilder(Env env,
StringValue value)
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.
|
void |
varDumpImpl(Env env,
WriteStream out,
int depth,
java.util.IdentityHashMap<Value,java.lang.String> valueSet) |
void |
write(byte[] buf,
int offset,
int length)
Appends buffer to the ByteAppendable.
|
void |
write(int ch)
Appends value to the ByteAppendable.
|
void |
writeTo(java.io.OutputStream os)
Writes to a stream
|
toBinaryValueMarshalCostadd, append, append, append, append, append, appendBytes, appendBytes, appendRead, appendRead, appendReadAll, appendReadAll, appendReadAll, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUnicode, appendUtf8, bitAnd, bitOr, bitXor, cmp, cmpString, convertToUnicode, create, create, endsWith, equalsString, equalsStringIgnoreCase, getArg, getChars, getRawCharArray, increment, indexOf, intern, isCallable, isDoubleConvertible, isLongConvertible, isNumber, isNumeric, isString, jsonEncode, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, putThisFieldArray, regionMatches, startsWith, sub, substring, substring, toAutoArray, toAutoObject, toByteMarshalCost, toCallable, toCharArray, toCharArrayMarshalCost, toCharMarshalCost, toDouble, toDoubleMarshalCost, toFloatMarshalCost, toIntegerMarshalCost, toLong, toLongMarshalCost, toLowerCase, toReader, toShortMarshalCost, toSimpleReader, toString, toStringMarshalCost, toStringValue, toStringValue, toStringValueMarshalCost, toUnicode, toUpperCase, valuesToArray, varExportImplabs, add, addOne, 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, 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, isUnicode, isVar, key, keyExists, leq, lshift, lt, mod, mul, mul, neg, next, nextIndex, pop, pos, postdecr, postincr, postincr, predecr, preincr, preincr, prev, 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, toBinaryValue, 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, toUnicodeValueMarshalCost, toValue, toVar, unsetArray, unsetField, unsetThisArray, unsetThisField, unsetThisPrivateField, varDump, varExportpublic static final StringBuilderValue EMPTY
public StringBuilderValue()
public StringBuilderValue(int capacity)
public StringBuilderValue(int capacity,
boolean isAbsolute)
public StringBuilderValue(byte[] buffer,
int offset,
int length)
public StringBuilderValue(char[] buffer,
int offset,
int length)
public StringBuilderValue(char[] buffer,
int length)
public StringBuilderValue(byte[] buffer)
public StringBuilderValue(char ch)
public StringBuilderValue(byte ch)
public StringBuilderValue(java.lang.String s)
public StringBuilderValue(char[] s)
public StringBuilderValue(char[] s,
Value v1)
public StringBuilderValue(byte[] s,
Value v1)
public StringBuilderValue(Value v1)
public StringBuilderValue(StringBuilderValue v)
public static StringValue create(byte value)
public static StringValue create(char value)
public static Value create(java.lang.String value)
public final java.lang.String getValue()
public java.lang.String getType()
getType in class StringValuepublic ValueType getValueType()
getValueType in class StringValuepublic static final ValueType getValueType(byte[] buffer, int offset, int len)
public final boolean isScalar()
isScalar in class StringValuepublic final boolean toBoolean()
toBoolean in class StringValuepublic double toDouble()
toDouble in class StringValuepublic static final double toDouble(byte[] buffer,
int offset,
int len)
public final java.io.InputStream toInputStream()
toInputStream in class StringValuepublic java.lang.String toString()
toString in interface java.lang.CharSequencetoString in class java.lang.Objectpublic final StringValue toBinaryValue(Env env)
toBinaryValue in class Valuepublic final StringValue toBinaryValue(java.lang.String charset)
toBinaryValue in class Valuepublic StringValue toUnicodeValue()
toUnicodeValue in class Valuepublic StringValue toUnicodeValue(Env env)
toUnicodeValue in class Valuepublic StringValue toUnicodeValue(Env env, java.lang.String charset)
toUnicodeValue in class StringValuepublic final java.lang.Object toJavaObject()
toJavaObject in class StringValuepublic final boolean isEmpty()
isEmpty in class StringValuepublic final void writeTo(java.io.OutputStream os)
writeTo in class StringValuepublic StringValue appendTo(StringBuilderValue bb)
public StringValue appendTo(UnicodeBuilderValue bb)
appendTo in class StringValuepublic StringValue appendTo(LargeStringBuilderValue bb)
public StringValue appendTo(BinaryBuilderValue bb)
public Value toKey()
toKey in class StringValuepublic final byte[] toBytes()
toBytes in class StringValuepublic final Value get(Value key)
get in class StringValuepublic Value append(Value index, Value value)
append in class StringValuepublic final int length()
length in interface java.lang.CharSequencelength in class StringValuepublic final char charAt(int index)
charAt in interface java.lang.CharSequencecharAt in class StringValuepublic Value charValueAt(long index)
charValueAt in class StringValuepublic Value setCharValueAt(long indexL, Value value)
setCharValueAt in class StringValuepublic int indexOf(char match)
indexOf in class StringValuepublic int indexOf(char match,
int head)
indexOf in class StringValuepublic java.lang.CharSequence subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencesubSequence in class StringValuepublic java.lang.String stringSubstring(int start,
int end)
stringSubstring in class StringValuepublic StringValue toLowerCase(java.util.Locale locale)
toLowerCase in class StringValuepublic StringValue toUpperCase()
toUpperCase in class StringValuepublic boolean regionMatches(int offset,
char[] mBuffer,
int mOffset,
int mLength)
regionMatches in class StringValuepublic boolean regionMatchesIgnoreCase(int offset,
char[] mBuffer,
int mOffset,
int mLength)
regionMatchesIgnoreCase in class StringValuepublic StringBuilderValue createStringBuilder()
createStringBuilder in class StringValuepublic StringBuilderValue createStringBuilder(int length)
createStringBuilder in class StringValuepublic StringBuilderValue createStringBuilder(byte[] buffer, int offset, int length)
public StringValue copyStringBuilder()
copyStringBuilder in class Valuepublic StringValue toStringBuilder()
toStringBuilder in class Valuepublic StringValue toStringBuilder(Env env)
toStringBuilder in class StringValuepublic StringValue toStringBuilder(Env env, Value value)
toStringBuilder in class Valuepublic StringValue toStringBuilder(Env env, StringValue value)
toStringBuilder in class Valuepublic final StringValue append(java.lang.String s)
append in class StringValuepublic final StringValue append(java.lang.String s, int start, int end)
append in class StringValuepublic final StringValue append(char ch)
append in class StringValuepublic final void write(int ch)
ByteAppendablewrite in interface ByteAppendablewrite in class StringValuepublic final StringValue append(char[] buf, int offset, int length)
append in class StringValuepublic final StringValue append(char[] buf)
append in class StringValuepublic StringValue appendUnicode(char[] buf)
appendUnicode in class StringValuepublic StringValue appendUnicode(char[] buf, int offset, int length)
appendUnicode in class StringValuepublic final StringValue append(java.lang.CharSequence buf, int head, int tail)
append in class StringValuepublic StringValue append(StringBuilderValue sb, int head, int tail)
append in class StringValuepublic final StringValue append(Value v)
append in class StringValuepublic final int indexOf(java.lang.CharSequence match,
int head)
indexOf in class StringValuepublic StringValue appendUnicode(Value v)
appendUnicode in class StringValuepublic StringValue appendUnicode(Value v1, Value v2)
appendUnicode in class StringValuepublic final StringValue append(byte[] buf, int offset, int length)
append in class StringValuepublic final void write(byte[] buf,
int offset,
int length)
StringValuewrite in interface ByteAppendablewrite in class StringValuepublic final StringValue append(byte[] buf)
append in class StringValuepublic final StringValue appendUtf8(byte[] buf, int offset, int length)
appendUtf8 in class StringValuepublic final StringValue appendByte(int v)
appendByte in class StringValuepublic final StringValue append(boolean v)
append in class StringValuepublic StringValue append(long v)
append in class StringValuepublic StringValue append(double v)
append in class StringValuepublic StringValue appendBytes(java.lang.String s)
appendBytes in class StringValuepublic final StringValue appendBytes(byte[] bytes, int offset, int end)
appendBytes in class StringValuepublic StringValue append(java.io.Reader reader, long length) throws java.io.IOException
StringValueappend in class StringValuejava.io.IOExceptionpublic final byte[] getBuffer()
public final void setLength(int offset)
setLength in class StringValuepublic final int getBufferLength()
public boolean isset(Value indexV)
isset in class StringValuepublic void print(Env env)
public void print(Env env, WriteStream out)
public void serialize(Env env, java.lang.StringBuilder sb)
serialize in class StringValuepublic java.lang.String toDebugString()
toDebugString in class StringValuepublic void varDumpImpl(Env env, WriteStream out, int depth, java.util.IdentityHashMap<Value,java.lang.String> valueSet) throws java.io.IOException
varDumpImpl in class StringValuejava.io.IOExceptionpublic java.io.OutputStream getOutputStream()
StringValuegetOutputStream in class StringValuepublic long getCrc32Value()
getCrc32Value in class StringValuepublic void ensureAppendCapacity(int newCapacity)
StringValueensureAppendCapacity in class StringValueprotected void ensureCapacity(int newCapacity)
public int hashCode()
hashCode in class StringValuepublic int hashCodeCaseInsensitive()
hashCodeCaseInsensitive in class StringValuepublic int getHashCode()
getHashCode in class Valuepublic boolean eq(Value rValue)
eq in class StringValuepublic boolean equals(java.lang.Object o)
StringValueequals in class StringValuepublic boolean equalsIgnoreCase(java.lang.Object o)
equalsIgnoreCase in class StringValuepublic void generate(java.io.PrintWriter out)
throws java.io.IOException
generate in class StringValueout - the writer to the Java source code.java.io.IOException