|
||||||||||
| 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
com.caucho.quercus.env.BinaryValue
com.caucho.quercus.env.StringBuilderValue
public class StringBuilderValue
Represents a PHP 5 style string builder (unicode.semantics = off)
| Field Summary | |
|---|---|
static StringBuilderValue |
EMPTY
|
| Fields inherited from class com.caucho.quercus.env.StringValue |
|---|
IS_DOUBLE, IS_LONG, IS_STRING, MIN_LENGTH |
| Fields inherited from class com.caucho.quercus.env.Value |
|---|
L, NULL_ARGS, NULL_VALUE_ARRAY, SCALAR_V |
| Constructor Summary | |
|---|---|
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(java.lang.String s)
|
|
StringBuilderValue(StringBuilderValue v)
|
|
StringBuilderValue(Value v1)
|
|
StringBuilderValue(Value v1,
Value v2)
|
|
StringBuilderValue(Value v1,
Value v2,
Value v3)
|
|
| Method Summary | |
|---|---|
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 |
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()
|
int |
getOffset()
Returns the offset. |
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 |
isPHP5String()
|
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 |
setOffset(int offset)
Sets the offset. |
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()
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 |
| Methods inherited from class com.caucho.quercus.env.BinaryValue |
|---|
toBinaryValueMarshalCost |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final StringBuilderValue EMPTY
| Constructor Detail |
|---|
public StringBuilderValue()
public StringBuilderValue(int capacity)
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 StringBuilderValue(Value v1,
Value v2)
public StringBuilderValue(Value v1,
Value v2,
Value v3)
| Method Detail |
|---|
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 StringValue
public static final ValueType getValueType(byte[] buffer,
int offset,
int len)
public final boolean isScalar()
isScalar in class StringValuepublic boolean isPHP5String()
isPHP5String in class StringValuepublic final boolean toBoolean()
toBoolean in class StringValuepublic long toLong()
toLong in class Valuepublic double toDouble()
toDouble in class StringValue
public 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 Value
public 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)
appendTo in class Valuepublic StringValue appendTo(UnicodeBuilderValue bb)
appendTo in class StringValuepublic StringValue appendTo(LargeStringBuilderValue bb)
appendTo in class Valuepublic StringValue appendTo(BinaryBuilderValue bb)
appendTo in class Valuepublic Value toKey()
toKey in class StringValuepublic final byte[] toBytes()
toBytes in class StringValuepublic final Value get(Value key)
get in class StringValue
public Value put(Value index,
Value value)
put in class Value
public Value append(Value index,
Value value)
append in class StringValuepublic 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 StringValue
public Value setCharValueAt(long indexL,
Value value)
setCharValueAt in class StringValuepublic int indexOf(char match)
indexOf in class StringValue
public int indexOf(char match,
int head)
indexOf in class StringValue
public java.lang.CharSequence subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencesubSequence in class StringValue
public java.lang.String stringSubstring(int start,
int end)
stringSubstring in class StringValuepublic StringValue toLowerCase()
toLowerCase in class StringValuepublic StringValue toUpperCase()
toUpperCase in class StringValue
public boolean regionMatches(int offset,
char[] mBuffer,
int mOffset,
int mLength)
regionMatches in class StringValue
public 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 StringValue
public 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 StringValue
public StringValue toStringBuilder(Env env,
Value value)
toStringBuilder in class Value
public StringValue toStringBuilder(Env env,
StringValue value)
toStringBuilder in class Valuepublic final StringValue append(java.lang.String s)
append in class StringValue
public 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)
ByteAppendable
write in interface ByteAppendablewrite in class StringValue
public 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 StringValue
public StringValue appendUnicode(char[] buf,
int offset,
int length)
appendUnicode in class StringValue
public final StringValue append(java.lang.CharSequence buf,
int head,
int tail)
append in class StringValue
public StringValue append(StringBuilderValue sb,
int head,
int tail)
append in class StringValuepublic final StringValue append(Value v)
append in class StringValue
public final int indexOf(java.lang.CharSequence match,
int head)
indexOf in class StringValuepublic StringValue appendUnicode(Value v)
appendUnicode in class StringValue
public StringValue appendUnicode(Value v1,
Value v2)
appendUnicode in class StringValue
public final StringValue append(byte[] buf,
int offset,
int length)
append in class StringValue
public final void write(byte[] buf,
int offset,
int length)
StringValue
write in interface ByteAppendablewrite in class StringValuepublic final StringValue append(byte[] buf)
append in class StringValue
public 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 StringValue
public final StringValue appendBytes(byte[] bytes,
int offset,
int end)
appendBytes in class StringValue
public StringValue append(java.io.Reader reader,
long length)
throws java.io.IOException
StringValue
append in class StringValuejava.io.IOExceptionpublic final byte[] getBuffer()
public int getOffset()
public void setOffset(int offset)
public int getBufferLength()
public boolean isset(Value indexV)
isset in class StringValuepublic void print(Env env)
print in class Valueenv -
public void print(Env env,
WriteStream out)
print in class Valueenv -
public void serialize(Env env,
java.lang.StringBuilder sb)
serialize in class StringValuepublic java.lang.String toDebugString()
toDebugString in class StringValue
public 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()
public long getCrc32Value()
getCrc32Value in class StringValuepublic void ensureAppendCapacity(int newCapacity)
StringValue
ensureAppendCapacity 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)
StringValue
equals in class StringValuepublic boolean eql(Value o)
Value
eql in class Value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||