org.axiondb.types

Class VarBinaryType

public class VarBinaryType extends BaseDataType implements Serializable, Comparator, DataType.NonFixedPrecision

A DataTyperepresenting a BinaryArrayvalue.

Version: $Revision: 1.9 $ $Date: 2005/11/03 01:26:57 $

Author: Rahul Dwivedi Rodney Waldhoff Ahimanikya Satapathy

Constructor Summary
VarBinaryType()
VarBinaryType(int length)
Creates a new instance of VarBinaryType
Method Summary
booleanaccepts(Object value)
Return true if a field of my type can be assigned the given non- null value , false otherwise.
intcompare(Object a, Object b)
Objectconvert(Object value)
Converts an acceptablevalue to one of the appropriate type.
intgetColumnDisplaySize()
ComparatorgetComparator()
intgetJdbcType()
Returns java.sql.Types#VARBINARY.
intgetPrecision()
DataTypemakeNewInstance()
Objectread(DataInput in)
Instantiate an object of my type from the given DataInput.
voidsetLength(int length)
voidsetPrecision(int newSize)
Objectsuccessor(Object value)
booleansupportsSuccessor()
byte[]toByteArray(Object value)
StringtoString(Object value)
voidwrite(Object value, DataOutput out)
Write an object of my type to the given DataOutput.

Constructor Detail

VarBinaryType

public VarBinaryType()

VarBinaryType

public VarBinaryType(int length)
Creates a new instance of VarBinaryType

Method Detail

accepts

public boolean accepts(Object value)
Return true if a field of my type can be assigned the given non- null value , false otherwise.

Parameters: value non- null value

compare

public int compare(Object a, Object b)

convert

public Object convert(Object value)
Converts an acceptablevalue to one of the appropriate type.

getColumnDisplaySize

public int getColumnDisplaySize()

getComparator

public Comparator getComparator()

getJdbcType

public int getJdbcType()
Returns java.sql.Types#VARBINARY.

getPrecision

public int getPrecision()

makeNewInstance

public DataType makeNewInstance()

read

public Object read(DataInput in)
Instantiate an object of my type from the given DataInput. The next sequence of bytes to be read from the DataInput will have been written by VarBinaryType.

Parameters: in DataInput from which to read data

Throws: IOException if error occurs during read

setLength

public void setLength(int length)

setPrecision

public void setPrecision(int newSize)

successor

public Object successor(Object value)

supportsSuccessor

public boolean supportsSuccessor()

toByteArray

public byte[] toByteArray(Object value)

toString

public String toString(Object value)

write

public void write(Object value, DataOutput out)
Write an object of my type to the given DataOutput.

Parameters: value the value to write, which must be acceptableto this DataType out DataOutput to receive data

Throws: IOException if error occurs while writing value, or if value is invalid for this type