com.caucho.quercus.env
Class BinaryBuilderValue

java.lang.Object
  extended by com.caucho.quercus.env.Value
      extended by com.caucho.quercus.env.StringValue
          extended by com.caucho.quercus.env.BinaryValue
              extended by com.caucho.quercus.env.StringBuilderValue
                  extended by com.caucho.quercus.env.BinaryBuilderValue
All Implemented Interfaces:
ByteAppendable, java.io.Serializable, java.lang.CharSequence
Direct Known Subclasses:
UnsetBinaryValue

public class BinaryBuilderValue
extends StringBuilderValue

Represents a 8-bit PHP 6 style binary builder (unicode.semantics = on)

See Also:
Serialized Form

Field Summary
static BinaryBuilderValue 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
BinaryBuilderValue()
           
BinaryBuilderValue(BinaryBuilderValue v)
           
BinaryBuilderValue(byte ch)
           
BinaryBuilderValue(byte[] buffer)
           
BinaryBuilderValue(byte[] buffer, int offset, int length)
           
BinaryBuilderValue(char[] buffer)
           
BinaryBuilderValue(char[] s, Value v1)
           
BinaryBuilderValue(int capacity)
           
BinaryBuilderValue(java.lang.String s)
           
BinaryBuilderValue(TempBuffer head)
           
 
Method Summary
 StringValue append(BinaryBuilderValue sb, int head, int tail)
          Append a Java buffer to the value.
 StringValue appendTo(UnicodeBuilderValue sb)
          Append to a string builder.
 StringValue appendUnicode(boolean v)
          Append a Java boolean to the value.
 StringValue appendUnicode(char ch)
          Append a Java char to the value.
 StringValue appendUnicode(char[] buf, int offset, int length)
          Append a Java buffer to the value.
 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 object to the value.
 StringValue appendUnicode(java.lang.String s)
          Append a Java string to the value.
 StringValue appendUnicode(java.lang.String s, int start, int end)
          Append a Java string to the value.
 StringValue appendUnicode(Value value)
          Append a value to the value.
 Value charValueAt(long index)
          Returns the character at an index
static StringValue create(char value)
          Creates the string.
static StringValue create(int value)
          Creates the string.
 BinaryBuilderValue createStringBuilder()
          Creates a string builder of the same type.
 BinaryBuilderValue createStringBuilder(byte[] buffer, int offset, int length)
          Creates a string builder of the same type.
 BinaryBuilderValue createStringBuilder(int length)
          Creates a string builder of the same type.
 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
 java.lang.String getType()
          Returns the type.
 boolean isBinary()
          Returns true for a BinaryValue.
 java.lang.CharSequence subSequence(int start, int end)
          Returns a subsequence
 int toBinaryValueMarshalCost()
          Cost to convert to a binary value
 int toByteArrayMarshalCost()
          Cost to convert to a byte[]
 int toByteMarshalCost()
          Cost to convert to a byte
 int toCharArrayMarshalCost()
          Cost to convert to a char[]
 java.lang.String toDebugString()
           
 StringValue toLowerCase()
          Convert to lower case.
 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
 int toStringMarshalCost()
          Cost to convert to a String
 int toStringValueMarshalCost()
          Cost to convert to a string value
 StringValue toUnicode(Env env)
          Converts to a Unicode, 16-bit string.
 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)
           
 
Methods inherited from class com.caucho.quercus.env.StringBuilderValue
append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, appendByte, appendBytes, appendBytes, appendTo, appendTo, appendTo, appendUnicode, appendUnicode, appendUtf8, charAt, copyStringBuilder, create, create, ensureAppendCapacity, ensureCapacity, get, getBuffer, getBufferLength, getCrc32Value, getHashCode, getOffset, getOutputStream, getValue, getValueType, getValueType, hashCode, hashCodeCaseInsensitive, indexOf, indexOf, indexOf, isEmpty, isPHP5String, isScalar, isset, length, print, print, put, regionMatches, regionMatchesIgnoreCase, serialize, setCharValueAt, setOffset, stringSubstring, toBinaryValue, toBinaryValue, toBoolean, toBytes, toDouble, toDouble, toInputStream, toJavaObject, toKey, toLong, toString, write, write, writeTo
 
Methods inherited from class com.caucho.quercus.env.StringValue
add, append, append, append, append, append, appendBytes, appendBytes, appendRead, appendRead, appendReadAll, appendReadAll, appendReadAll, appendUtf8, bitAnd, bitOr, bitXor, cmp, cmpString, convertToUnicode, create, create, endsWith, equalsIgnoreCase, generate, getArg, getChars, getRawCharArray, increment, indexOf, isDoubleConvertible, isLongConvertible, isNumber, isNumeric, isString, jsonEncode, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, regionMatches, sub, substring, substring, toAutoArray, toAutoObject, toCallable, toCharArray, toCharMarshalCost, toDouble, toDoubleMarshalCost, toFloatMarshalCost, toInputStream, toIntegerMarshalCost, toLong, toLongMarshalCost, toReader, toShortMarshalCost, toSimpleReader, toStringValue, toStringValue, valuesToArray, varExport
 
Methods inherited from class com.caucho.quercus.env.Value
abs, 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, geq, getArray, getArray, getBaseIterator, getCallableName, getCalledClass, getClassName, getCount, getCountRecursive, getDirty, getField, getFieldArg, getFieldArgRef, getFieldArray, getFieldObject, getFieldVar, getIterator, getKeyArray, getKeyIterator, getObject, getObject, getQuercusClass, getRef, getResourceType, getSize, getThisField, getThisFieldArg, getThisFieldArgRef, getThisFieldArray, getThisFieldObject, getThisFieldVar, getValueArray, getValueIterator, getVar, gt, hasCurrent, initField, isA, isA, isArray, isBoolean, isCallable, isDefault, isDouble, 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, putField, putField, putField, putObject, putThisField, putThisField, putVar, remove, reset, rshift, serialize, set, setFieldInit, setJavaObject, shuffle, sub_rev, sub, subOne, toArgRef, toArray, toArrayValue, toBigDecimal, toBigInteger, toBinaryValue, toBooleanMarshalCost, toChar, toDoubleValue, toException, toInt, toInternString, toJavaBoolean, toJavaByte, toJavaCalendar, toJavaCharacter, toJavaCollection, toJavaDate, toJavaDouble, toJavaFloat, toJavaInteger, toJavaList, toJavaLong, toJavaMap, toJavaObject, toJavaObjectMarshalCost, toJavaObjectNotNull, toJavaShort, toJavaString, toJavaURL, toLocalRef, toLocalThis, toLocalValue, toLocalValueReadOnly, toLocalVar, toLocalVarDeclAsRef, toLongValue, toObject, toRef, toRefValue, toString, toUnicodeValueMarshalCost, toValue, toVar, unsetArray, unsetField, unsetThisArray, unsetThisField, varDump
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final BinaryBuilderValue EMPTY
Constructor Detail

BinaryBuilderValue

public BinaryBuilderValue()

BinaryBuilderValue

public BinaryBuilderValue(BinaryBuilderValue v)

BinaryBuilderValue

public BinaryBuilderValue(int capacity)

BinaryBuilderValue

public BinaryBuilderValue(byte[] buffer,
                          int offset,
                          int length)

BinaryBuilderValue

public BinaryBuilderValue(byte[] buffer)

BinaryBuilderValue

public BinaryBuilderValue(java.lang.String s)

BinaryBuilderValue

public BinaryBuilderValue(char[] buffer)

BinaryBuilderValue

public BinaryBuilderValue(char[] s,
                          Value v1)

BinaryBuilderValue

public BinaryBuilderValue(TempBuffer head)

BinaryBuilderValue

public BinaryBuilderValue(byte ch)
Method Detail

create

public static StringValue create(int value)
Creates the string.


create

public static StringValue create(char value)
Creates the string.


getType

public java.lang.String getType()
Returns the type.

Overrides:
getType in class StringBuilderValue

isBinary

public boolean isBinary()
Returns true for a BinaryValue.

Overrides:
isBinary in class Value

toByteMarshalCost

public int toByteMarshalCost()
Cost to convert to a byte

Overrides:
toByteMarshalCost in class StringValue

toStringMarshalCost

public int toStringMarshalCost()
Cost to convert to a String

Overrides:
toStringMarshalCost in class StringValue

toCharArrayMarshalCost

public int toCharArrayMarshalCost()
Cost to convert to a char[]

Overrides:
toCharArrayMarshalCost in class StringValue

toByteArrayMarshalCost

public int toByteArrayMarshalCost()
Cost to convert to a byte[]

Overrides:
toByteArrayMarshalCost in class Value

toBinaryValueMarshalCost

public int toBinaryValueMarshalCost()
Cost to convert to a binary value

Overrides:
toBinaryValueMarshalCost in class BinaryValue

toStringValueMarshalCost

public int toStringValueMarshalCost()
Cost to convert to a string value

Overrides:
toStringValueMarshalCost in class StringValue

toUnicode

public StringValue toUnicode(Env env)
Converts to a Unicode, 16-bit string.

Overrides:
toUnicode in class StringValue

toUnicodeValue

public StringValue toUnicodeValue()
Converts to a UnicodeValue.

Overrides:
toUnicodeValue in class StringBuilderValue

toUnicodeValue

public StringValue toUnicodeValue(Env env)
Converts to a UnicodeValue.

Overrides:
toUnicodeValue in class StringBuilderValue

toUnicodeValue

public StringValue toUnicodeValue(Env env,
                                  java.lang.String charset)
Converts to a UnicodeValue in desired charset.

Overrides:
toUnicodeValue in class StringBuilderValue

toStringBuilder

public StringValue toStringBuilder()
Converts to a string builder

Overrides:
toStringBuilder in class StringBuilderValue

charValueAt

public Value charValueAt(long index)
Returns the character at an index

Overrides:
charValueAt in class StringBuilderValue

subSequence

public java.lang.CharSequence subSequence(int start,
                                          int end)
Returns a subsequence

Specified by:
subSequence in interface java.lang.CharSequence
Overrides:
subSequence in class StringBuilderValue

toLowerCase

public StringValue toLowerCase()
Convert to lower case.

Overrides:
toLowerCase in class StringBuilderValue

toUpperCase

public StringValue toUpperCase()
Convert to lower case.

Overrides:
toUpperCase in class StringBuilderValue

createStringBuilder

public BinaryBuilderValue createStringBuilder()
Creates a string builder of the same type.

Overrides:
createStringBuilder in class StringBuilderValue

createStringBuilder

public BinaryBuilderValue createStringBuilder(int length)
Creates a string builder of the same type.

Overrides:
createStringBuilder in class StringBuilderValue

createStringBuilder

public BinaryBuilderValue createStringBuilder(byte[] buffer,
                                              int offset,
                                              int length)
Creates a string builder of the same type.

Overrides:
createStringBuilder in class StringBuilderValue

toStringBuilder

public StringValue toStringBuilder(Env env)
Converts to a string builder

Overrides:
toStringBuilder in class StringBuilderValue

toStringBuilder

public StringValue toStringBuilder(Env env,
                                   Value value)
Converts to a string builder

Overrides:
toStringBuilder in class StringBuilderValue

toStringBuilder

public StringValue toStringBuilder(Env env,
                                   StringValue value)
Converts to a string builder

Overrides:
toStringBuilder in class StringBuilderValue

append

public final StringValue append(BinaryBuilderValue sb,
                                int head,
                                int tail)
Append a Java buffer to the value.


appendUnicode

public final StringValue appendUnicode(char[] buf,
                                       int offset,
                                       int length)
Append a Java buffer to the value.

Overrides:
appendUnicode in class StringBuilderValue

appendUnicode

public final StringValue appendUnicode(java.lang.String s)
Append a Java string to the value.

Overrides:
appendUnicode in class StringValue

appendUnicode

public final StringValue appendUnicode(java.lang.String s,
                                       int start,
                                       int end)
Append a Java string to the value.

Overrides:
appendUnicode in class StringValue

appendUnicode

public final StringValue appendUnicode(Value value)
Append a value to the value.

Overrides:
appendUnicode in class StringBuilderValue

appendUnicode

public final StringValue appendUnicode(char ch)
Append a Java char to the value.

Overrides:
appendUnicode in class StringValue

appendUnicode

public final StringValue appendUnicode(boolean v)
Append a Java boolean to the value.

Overrides:
appendUnicode in class StringValue

appendUnicode

public StringValue appendUnicode(long v)
Append a Java long to the value.

Overrides:
appendUnicode in class StringValue

appendUnicode

public StringValue appendUnicode(double v)
Append a Java double to the value.

Overrides:
appendUnicode in class StringValue

appendUnicode

public StringValue appendUnicode(java.lang.Object v)
Append a Java object to the value.

Overrides:
appendUnicode in class StringValue

appendTo

public StringValue appendTo(UnicodeBuilderValue sb)
Append to a string builder.

Overrides:
appendTo in class StringBuilderValue

eq

public boolean eq(Value rValue)
Returns true for equality

Overrides:
eq in class StringBuilderValue

equals

public boolean equals(java.lang.Object o)
Description copied from class: StringValue
Test for equality

Overrides:
equals in class StringBuilderValue

eql

public boolean eql(Value o)
Description copied from class: Value
Returns true for equality

Overrides:
eql in class StringBuilderValue

toDebugString

public java.lang.String toDebugString()
Overrides:
toDebugString in class StringBuilderValue

varDumpImpl

public void varDumpImpl(Env env,
                        WriteStream out,
                        int depth,
                        java.util.IdentityHashMap<Value,java.lang.String> valueSet)
                 throws java.io.IOException
Overrides:
varDumpImpl in class StringBuilderValue
Throws:
java.io.IOException