|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.quercus.env.Value
com.caucho.quercus.env.StringValue
public abstract class StringValue
Represents a Quercus string value.
| Field Summary | |
|---|---|
static StringValue |
EMPTY
|
protected static int |
IS_DOUBLE
|
protected static int |
IS_LONG
|
protected static int |
IS_STRING
|
protected static int |
MIN_LENGTH
|
| Fields inherited from class com.caucho.quercus.env.Value |
|---|
L, NULL_ARGS, NULL_VALUE_ARRAY, SCALAR_V |
| Constructor Summary | |
|---|---|
StringValue()
|
|
| Method Summary | |
|---|---|
Value |
add(long rValue)
Adds to the following value. |
StringValue |
append(boolean v)
Append a Java boolean to the value. |
StringValue |
append(byte[] buf)
Append a byte buffer to the value. |
StringValue |
append(byte[] buf,
int offset,
int length)
Append a byte 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(double v)
Append a Java double to the value. |
StringValue |
append(Env env,
StringValue unicodeStr,
java.lang.String charset)
|
StringValue |
append(long v)
Append a Java long to the value. |
StringValue |
append(java.lang.Object v)
Append a Java value to the value. |
StringValue |
append(java.io.Reader reader)
Append from a read stream |
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(TempBuffer ptr)
Append from a temp buffer list |
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 value, returning the new array, e.g. |
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(char[] buf,
int offset,
int length)
Append a Java char[] to the value without conversions. |
StringValue |
appendBytes(java.lang.String s)
Append a Java String to the value without conversions. |
StringValue |
appendBytes(StringValue s)
Append a Java String to the value without conversions. |
int |
appendRead(BinaryInput is,
long length)
Append from an input stream, using InputStream semantics, i.e call is.read() only once. |
int |
appendRead(java.io.InputStream is,
long length)
Append from an input stream, using InputStream.read semantics, i.e. |
int |
appendReadAll(BinaryInput is,
long length)
Append from an input stream, reading all available data from the stream. |
int |
appendReadAll(java.io.InputStream is,
long length)
Append from an input stream, reading from the input stream until end of file or the length is reached. |
int |
appendReadAll(ReadStream is,
long length)
Append from an input stream, reading from the input stream until end of file or the length is reached. |
StringValue |
appendTo(UnicodeBuilderValue sb)
Append to a string builder. |
StringValue |
appendUnicode(boolean v)
Append a Java boolean to the value. |
StringValue |
appendUnicode(char v)
Append a Java char, possibly converting to a unicode string |
StringValue |
appendUnicode(char[] buffer)
Append a Java char buffer, possibly converting to a unicode string |
StringValue |
appendUnicode(char[] buffer,
int offset,
int length)
Append a Java char buffer, possibly converting to a unicode string |
StringValue |
appendUnicode(double v)
Append a Java double to the value. |
StringValue |
appendUnicode(long v)
Append a Java long to the value. |
StringValue |
appendUnicode(java.lang.Object v)
Append a Java value to the value. |
StringValue |
appendUnicode(java.lang.String value)
Append a Java char buffer, possibly converting to a unicode string |
StringValue |
appendUnicode(java.lang.String value,
int offset,
int length)
Append a Java char buffer, possibly converting to a unicode string |
StringValue |
appendUnicode(Value value)
Append a Java char buffer, possibly converting to a unicode string |
StringValue |
appendUnicode(Value v1,
Value v2)
Append a Java char buffer, possibly converting to a unicode string |
StringValue |
appendUtf8(byte[] buf)
Append a byte buffer to the value. |
StringValue |
appendUtf8(byte[] buf,
int offset,
int length)
Append a byte buffer to the value. |
Value |
bitAnd(Value rValue)
|
Value |
bitOr(Value rValue)
|
Value |
bitXor(Value rValue)
Binary xor. |
char |
charAt(int index)
Returns the character at a particular location |
Value |
charValueAt(long index)
Returns the character at an index |
int |
cmp(Value rValue)
Returns true for equality |
int |
cmpString(StringValue rValue)
Compare two strings |
StringValue |
convertToUnicode(Env env,
java.lang.String charset)
Decodes from charset and returns UnicodeValue. |
static StringValue |
create(char value)
Creates the string. |
StringValue |
create(Env env,
StringValue unicodeStr,
java.lang.String charset)
|
static Value |
create(java.lang.Object value)
Creates the string. |
static Value |
create(java.lang.String value)
Creates the string. |
abstract StringValue |
createStringBuilder()
Creates a string builder of the same type. |
abstract StringValue |
createStringBuilder(int length)
Creates a string builder of the same type. |
boolean |
endsWith(StringValue tail)
Returns true if the string ends with another string. |
void |
ensureAppendCapacity(int size)
Ensure enough append capacity. |
boolean |
eq(Value rValue)
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 |
Value |
getArg(Value key,
boolean isTop)
Returns the character at an index |
void |
getChars(int stringOffset,
char[] buffer,
int offset,
int length)
Copies the chars |
long |
getCrc32Value()
Calculates CRC32 value. |
char[] |
getRawCharArray()
|
java.lang.String |
getType()
Returns the type. |
ValueType |
getValueType()
Returns the ValueType. |
int |
hashCode()
Returns the hash code. |
int |
hashCodeCaseInsensitive()
Returns the case-insensitive hash code |
Value |
increment(int incr)
Increment the following value. |
int |
indexOf(char match)
Returns the last 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)
Returns the first 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 |
isDoubleConvertible()
Returns true for a double |
boolean |
isEmpty()
Returns true if the value is empty |
boolean |
isLongConvertible()
Returns true for a long |
boolean |
isNumber()
Returns true for a number |
boolean |
isNumeric()
Returns true for is_numeric |
boolean |
isPHP5String()
|
boolean |
isScalar()
Returns true for a scalar |
boolean |
isset(Value indexV)
Return true if the array value is set |
boolean |
isString()
Returns true for StringValue |
void |
jsonEncode(Env env,
StringValue sb)
Encodes the value in JSON. |
int |
lastIndexOf(char match)
Returns the last index of the match string, starting from the head. |
int |
lastIndexOf(char match,
int tail)
Returns the last index of the match string, starting from the head. |
int |
lastIndexOf(java.lang.CharSequence match)
Returns the last index of the match string, starting from the tail. |
int |
lastIndexOf(java.lang.CharSequence match,
int tail)
Returns the last index of the match string, starting from the tail. |
int |
length()
Returns the length of the string. |
boolean |
regionMatches(int offset,
char[] mBuffer,
int mOffset,
int mLength)
Returns true if the region matches |
boolean |
regionMatches(int offset,
StringValue match,
int mOffset,
int mLength)
Returns true if the region matches |
boolean |
regionMatchesIgnoreCase(int offset,
char[] match,
int mOffset,
int mLength)
Returns true if the region matches |
void |
serialize(Env env,
java.lang.StringBuilder sb)
Serializes the value. |
Value |
setCharValueAt(long index,
Value value)
sets the character at an index |
java.lang.String |
stringSubstring(int begin,
int end)
Returns a String substring |
Value |
sub(long rValue)
Adds to the following value. |
java.lang.CharSequence |
subSequence(int start,
int end)
Returns a subsequence |
StringValue |
substring(int head)
Returns a StringValue substring. |
StringValue |
substring(int begin,
int end)
Returns a StringValue substring. |
Value |
toAutoArray()
Converts to an array if null. |
Value |
toAutoObject(Env env)
Converts to an object. |
int |
toBinaryValueMarshalCost()
Cost to convert to a binary value |
boolean |
toBoolean()
Converts to a boolean. |
int |
toByteMarshalCost()
Cost to convert to a byte |
byte[] |
toBytes()
|
Callable |
toCallable(Env env)
Converts to a callable object |
char[] |
toCharArray()
Returns a character array |
int |
toCharArrayMarshalCost()
Cost to convert to a char[] |
int |
toCharMarshalCost()
Cost to convert to a character |
abstract java.lang.String |
toDebugString()
|
double |
toDouble()
Converts to a double. |
static double |
toDouble(java.lang.String s)
Converts to a double. |
int |
toDoubleMarshalCost()
Cost to convert to a double |
int |
toFloatMarshalCost()
Cost to convert to a float |
java.io.InputStream |
toInputStream()
Returns a byteArrayInputStream for the value. |
java.io.InputStream |
toInputStream(java.lang.String charset)
Returns a byte stream of chars. |
int |
toIntegerMarshalCost()
Cost to convert to an integer |
java.lang.Object |
toJavaObject()
Converts to a Java object. |
Value |
toKey()
Converts to a key. |
static long |
toLong(java.lang.String string)
Converts to a long. |
int |
toLongMarshalCost()
Cost to convert to a long |
StringValue |
toLowerCase()
Convert to lower case. |
java.io.Reader |
toReader(java.lang.String charset)
Returns a char stream. |
int |
toShortMarshalCost()
Cost to convert to a short |
java.io.Reader |
toSimpleReader()
|
StringValue |
toStringBuilder(Env env)
Converts to a string builder |
int |
toStringMarshalCost()
Cost to convert to a String |
StringValue |
toStringValue()
Converts to a string value. |
StringValue |
toStringValue(Env env)
Converts to a string value. |
int |
toStringValueMarshalCost()
Cost to convert to a StringValue |
StringValue |
toUnicode(Env env)
Converts to a unicode value. |
StringValue |
toUnicodeValue(Env env,
java.lang.String charset)
Decodes from charset and returns UnicodeValue. |
StringValue |
toUpperCase()
Convert to lower case. |
java.lang.Object |
valuesToArray(Env env,
java.lang.Class elementType)
Takes the values of this array, unmarshalls them to objects of type elementType, and puts them in a java array. |
abstract void |
varDumpImpl(Env env,
WriteStream out,
int depth,
java.util.IdentityHashMap<Value,java.lang.String> valueSet)
|
void |
varExport(java.lang.StringBuilder sb)
Exports the value. |
void |
write(byte[] buffer,
int offset,
int len)
Appends buffer to the ByteAppendable. |
void |
write(int value)
Appends value to the ByteAppendable. |
void |
writeTo(java.io.OutputStream os)
Writes to a stream |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.CharSequence |
|---|
toString |
| Field Detail |
|---|
public static final StringValue EMPTY
protected static final int MIN_LENGTH
protected static final int IS_STRING
protected static final int IS_LONG
protected static final int IS_DOUBLE
| Constructor Detail |
|---|
public StringValue()
| Method Detail |
|---|
public abstract StringValue createStringBuilder()
public abstract StringValue createStringBuilder(int length)
public static Value create(java.lang.String value)
public static StringValue create(char value)
public static Value create(java.lang.Object value)
public StringValue create(Env env,
StringValue unicodeStr,
java.lang.String charset)
public java.lang.String getType()
getType in class Valuepublic ValueType getValueType()
getValueType in class Valuepublic boolean isLongConvertible()
isLongConvertible in class Valuepublic boolean isDoubleConvertible()
isDoubleConvertible in class Valuepublic boolean isNumber()
public boolean isNumeric()
isNumeric in class Valuepublic boolean isScalar()
public boolean isString()
isString in class Valuepublic boolean isPHP5String()
public boolean isEmpty()
isEmpty in class Valuepublic int toDoubleMarshalCost()
toDoubleMarshalCost in class Valuepublic int toFloatMarshalCost()
toFloatMarshalCost in class Valuepublic int toLongMarshalCost()
toLongMarshalCost in class Valuepublic int toIntegerMarshalCost()
toIntegerMarshalCost in class Valuepublic int toShortMarshalCost()
toShortMarshalCost in class Valuepublic int toByteMarshalCost()
toByteMarshalCost in class Valuepublic int toCharMarshalCost()
toCharMarshalCost in class Valuepublic int toStringMarshalCost()
toStringMarshalCost in class Valuepublic int toCharArrayMarshalCost()
toCharArrayMarshalCost in class Valuepublic int toStringValueMarshalCost()
toStringValueMarshalCost in class Valuepublic int toBinaryValueMarshalCost()
toBinaryValueMarshalCost in class Valuepublic int cmp(Value rValue)
cmp in class Valuepublic boolean eq(Value rValue)
eq in class Valuepublic int cmpString(StringValue rValue)
public StringValue toStringValue()
toStringValue in class Valuepublic StringValue toStringValue(Env env)
toStringValue in class Valuepublic static long toLong(java.lang.String string)
public double toDouble()
toDouble in class Valuepublic static double toDouble(java.lang.String s)
public boolean toBoolean()
toBoolean in class Valuepublic Value toKey()
toKey in class Valuepublic final Value toAutoObject(Env env)
toAutoObject in class Valuepublic Value toAutoArray()
toAutoArray in class Valuepublic java.lang.Object toJavaObject()
toJavaObject in class Value
public java.lang.Object valuesToArray(Env env,
java.lang.Class elementType)
valuesToArray in class Valuepublic Callable toCallable(Env env)
toCallable in class Value
public Value append(Value index,
Value value)
append in class Valuepublic Value get(Value key)
get in class Value
public Value getArg(Value key,
boolean isTop)
getArg in class Valuepublic Value charValueAt(long index)
charValueAt in class Value
public Value setCharValueAt(long index,
Value value)
setCharValueAt in class Valuepublic Value increment(int incr)
increment in class Valuepublic Value add(long rValue)
add in class Valuepublic Value sub(long rValue)
sub in class Valuepublic Value bitAnd(Value rValue)
bitAnd in class Valuepublic Value bitOr(Value rValue)
bitOr in class Valuepublic Value bitXor(Value rValue)
Value
bitXor in class Value
public void serialize(Env env,
java.lang.StringBuilder sb)
serialize in class Value
public void jsonEncode(Env env,
StringValue sb)
jsonEncode in class Valuepublic StringValue append(java.lang.String s)
public StringValue append(java.lang.String s,
int start,
int end)
public StringValue append(char[] buf,
int offset,
int length)
public StringValue append(char[] buf)
public StringValue append(java.lang.CharSequence buf,
int head,
int tail)
public StringValue append(StringBuilderValue sb,
int head,
int tail)
public StringValue append(UnicodeBuilderValue sb,
int head,
int tail)
public StringValue append(Env env,
StringValue unicodeStr,
java.lang.String charset)
public StringValue append(char v)
public StringValue append(boolean v)
public StringValue append(long v)
public StringValue append(double v)
public StringValue append(java.lang.Object v)
public StringValue append(Value v)
public void ensureAppendCapacity(int size)
public StringValue append(byte[] buf,
int offset,
int length)
public StringValue append(byte[] buf)
public StringValue appendUtf8(byte[] buf,
int offset,
int length)
public StringValue appendUtf8(byte[] buf)
public StringValue appendTo(UnicodeBuilderValue sb)
appendTo in class Valuepublic StringValue appendUnicode(boolean v)
public StringValue appendUnicode(long v)
public StringValue appendUnicode(double v)
public StringValue appendUnicode(java.lang.Object v)
public StringValue appendUnicode(char v)
public StringValue appendUnicode(char[] buffer,
int offset,
int length)
public StringValue appendUnicode(char[] buffer)
public StringValue appendUnicode(java.lang.String value)
public StringValue appendUnicode(java.lang.String value,
int offset,
int length)
public StringValue appendUnicode(Value value)
public StringValue appendUnicode(Value v1,
Value v2)
public StringValue appendByte(int v)
public StringValue appendBytes(java.lang.String s)
public StringValue appendBytes(StringValue s)
public StringValue appendBytes(char[] buf,
int offset,
int length)
public StringValue appendBytes(byte[] bytes,
int offset,
int end)
public StringValue append(TempBuffer ptr)
public StringValue append(java.io.Reader reader)
throws java.io.IOException
java.io.IOException
public StringValue append(java.io.Reader reader,
long length)
throws java.io.IOException
java.io.IOException
public int appendRead(java.io.InputStream is,
long length)
public int appendReadAll(java.io.InputStream is,
long length)
public int appendReadAll(ReadStream is,
long length)
public int appendRead(BinaryInput is,
long length)
public int appendReadAll(BinaryInput is,
long length)
public void varExport(java.lang.StringBuilder sb)
varExport in class Valuepublic int length()
length in interface java.lang.CharSequencelength in class Valuepublic char charAt(int index)
charAt in interface java.lang.CharSequence
public java.lang.CharSequence subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencepublic final int indexOf(java.lang.CharSequence match)
public int indexOf(java.lang.CharSequence match,
int head)
public int indexOf(char match)
public int indexOf(char match,
int head)
public final int lastIndexOf(char match)
public int lastIndexOf(char match,
int tail)
public int lastIndexOf(java.lang.CharSequence match)
public int lastIndexOf(java.lang.CharSequence match,
int tail)
public boolean regionMatches(int offset,
char[] mBuffer,
int mOffset,
int mLength)
public boolean regionMatches(int offset,
StringValue match,
int mOffset,
int mLength)
public boolean regionMatchesIgnoreCase(int offset,
char[] match,
int mOffset,
int mLength)
public boolean endsWith(StringValue tail)
public StringValue substring(int head)
public StringValue substring(int begin,
int end)
public java.lang.String stringSubstring(int begin,
int end)
public char[] toCharArray()
public char[] getRawCharArray()
public void getChars(int stringOffset,
char[] buffer,
int offset,
int length)
public StringValue toLowerCase()
public StringValue toUpperCase()
public java.io.InputStream toInputStream()
toInputStream in class Value
public java.io.InputStream toInputStream(java.lang.String charset)
throws java.io.UnsupportedEncodingException
charset - to encode chars to
java.io.UnsupportedEncodingException
public java.io.Reader toSimpleReader()
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public java.io.Reader toReader(java.lang.String charset)
throws java.io.UnsupportedEncodingException
charset - to decode bytes by
java.io.UnsupportedEncodingExceptionpublic byte[] toBytes()
public StringValue toUnicode(Env env)
toUnicode in class Value
public StringValue toUnicodeValue(Env env,
java.lang.String charset)
env - charset -
public StringValue convertToUnicode(Env env,
java.lang.String charset)
env - charset - public StringValue toStringBuilder(Env env)
toStringBuilder in class Valuepublic boolean isset(Value indexV)
isset in class Valuepublic void writeTo(java.io.OutputStream os)
public long getCrc32Value()
public void write(int value)
ByteAppendable
write in interface ByteAppendable
public void write(byte[] buffer,
int offset,
int len)
write in interface ByteAppendablepublic int hashCode()
hashCode in class Valuepublic int hashCodeCaseInsensitive()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean equalsIgnoreCase(java.lang.Object o)
public void generate(java.io.PrintWriter out)
throws java.io.IOException
generate in class Valueout - the writer to the Java source code.
java.io.IOExceptionpublic abstract java.lang.String toDebugString()
toDebugString in class Value
public abstract void varDumpImpl(Env env,
WriteStream out,
int depth,
java.util.IdentityHashMap<Value,java.lang.String> valueSet)
throws java.io.IOException
varDumpImpl in class Valuejava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||