|
||||||||||
| 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
|
| 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(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. |
StringValue |
appendByte(int v)
Append a Java byte 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. |
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. |
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 |
Value |
bitAnd(Value rValue)
|
Value |
bitOr(Value rValue)
|
Value |
bitXor(Value rValue)
|
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 |
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)
Returns the character at an index |
void |
getChars(int stringOffset,
char[] buffer,
int offset,
int length)
Copies the chars |
abstract StringValue |
getEmptyString()
|
char[] |
getRawCharArray()
|
Value |
getRef(Value key)
Returns the character at an index |
java.lang.String |
getType()
Returns the type. |
ValueType |
getValueType()
Returns the ValueType. |
int |
hashCode()
Returns the hash code. |
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. |
StringValue |
intern(Quercus quercus)
Interns the string. |
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 |
isString()
Returns true for StringValue |
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. |
Value |
postincr(int incr)
Post-increment the following value. |
Value |
preincr(int incr)
Pre-increment the following value. |
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,
java.lang.String value)
sets the character at an index |
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. |
StringValue |
toBinaryValue(Env env,
java.lang.String charset)
Converts to a BinaryValue in desired charset. |
boolean |
toBoolean()
Converts to a boolean. |
byte[] |
toBytes()
|
char[] |
toCharArray()
Returns a character array |
abstract java.lang.String |
toDebugString()
|
double |
toDouble()
Converts to a double. |
static double |
toDouble(java.lang.String s)
Converts to a double. |
java.io.InputStream |
toInputStream()
Returns a byteArrayInputStream for the value. |
java.io.InputStream |
toInputStream(java.lang.String charset)
Returns a byte stream of chars. |
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. |
StringValue |
toLowerCase()
Convert to lower case. |
java.io.Reader |
toReader(java.lang.String charset)
Returns a char stream. |
StringValue |
toStringBuilder(Env env)
Converts to a string builder |
StringValue |
toStringValue()
Converts to a string 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 |
writeTo(java.io.OutputStream os)
Writes to a stream |
| Methods inherited from class java.lang.Object |
|---|
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 IS_STRING
protected static final int IS_LONG
protected static final int IS_DOUBLE
| Constructor Detail |
|---|
public StringValue()
| Method Detail |
|---|
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 abstract StringValue createStringBuilder()
public abstract StringValue createStringBuilder(int length)
public abstract StringValue getEmptyString()
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 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 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 java.lang.Object toJavaObject()
toJavaObject in class Value
public java.lang.Object valuesToArray(Env env,
java.lang.Class elementType)
valuesToArray in class Valuepublic Value toAutoArray()
toAutoArray in class Valuepublic Value get(Value key)
get in class Valuepublic Value getArg(Value key)
getArg in class Valuepublic Value getRef(Value key)
getRef in class Valuepublic Value charValueAt(long index)
charValueAt in class Value
public Value setCharValueAt(long index,
java.lang.String value)
setCharValueAt in class Valuepublic Value preincr(int incr)
preincr in class Valuepublic Value postincr(int incr)
postincr 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)
bitXor in class Value
public void serialize(Env env,
java.lang.StringBuilder sb)
serialize 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(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 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(char[] buf,
int offset,
int length)
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 appendRead(BinaryInput is,
long length)
public int appendReadAll(BinaryInput is,
long length)
public void varExport(java.lang.StringBuilder sb)
varExport in class Valuepublic StringValue intern(