com.informix.jdbc

## Class IfxVarChar

- java.lang.Object
- - com.informix.jdbc.IfxObject
  - - com.informix.jdbc.IfxVarChar

Direct Known Subclasses:
  IfxLvarchar

    public class IfxVarChar
    extends IfxObject

Support for Varchar datatypes. This class derived from IfxObject class.

### Field Summary

Fields
`protected java.lang.String` `value` The Varchar value

### Fields inherited from class com.informix.jdbc.IfxObject

`conn, encodedLength, extendedID, extendedName, extendedOwner, ifxType, isNull, jdbcType, sourceType, trace, typeMap, used_in_update`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(java.lang.Object other)` Find out whether two objects are equal.
`void` `fromAsciiStream(java.io.InputStream x, int length)`
`void` `fromAsciiStream(java.io.InputStream x, long length)`
`void` `fromBigDecimal(java.math.BigDecimal val)` Convert from BigDecimal value to VarChar value.
`void` `fromBoolean(boolean b)` Convert from java boolean
`void` `fromBoolean(java.lang.Boolean b)` Convert from java Boolean
`void` `fromByte(byte b)` Convert from java byte
`void` `fromByte(java.lang.Byte b)` Convert from java Byte
`void` `fromBytes(byte[] str)`
`void` `fromCharacterStream(java.io.Reader x, int length)`
`void` `fromCharacterStream(java.io.Reader reader, long length)`
`void` `fromDate(java.sql.Date val)` Convert from Date value to VarChar value.
`void` `fromDecimal(java.math.BigDecimal B)` Convert to IfxVarChar from java big decimal
`void` `fromDouble(double val)` Convert from Double value to VarChar value.
`void` `fromDouble(java.lang.Double val)` Convert from Double value to VarChar value.
`void` `fromFloat(float val)` Convert from float value to VarChar value.
`void` `fromFloat(java.lang.Float val)` Convert from Float value to VarChar value.
`void` `fromIfx(byte[] b)` Set value of this data type to the given Informix network format
`void` `fromIfx(byte[] b, int offset, int length)` Set value of this data type to the given Informix network format
`void` `fromIfx(byte[] b, int offset, int length, java.lang.String dbEnc)` Set value of this data type to the given Informix network format
`void` `fromIfx(byte[] b, java.lang.String dbEnc)` Set value of this data type to the given Informix network format
`void` `fromInputStream(java.io.InputStream x, int length)`
`void` `fromInputStream(java.io.InputStream x, long length)`
`void` `fromInt(int I)` Convert from integer value
`void` `fromInt(java.lang.Integer I)` Convert from java.sql.Integer value.
`void` `fromLong(long val)` Convert from Long value to VarChar value.
`void` `fromLong(java.lang.Long val)` Convert from Long value to VarChar value.
`void` `fromShort(short val)` Convert from short value.
`void` `fromShort(java.lang.Short val)` Convert from Short value.
`void` `fromString(java.lang.String str)` Convert value from a String type
`void` `fromString(java.lang.String str, boolean trimString)`
`void` `fromTime(java.sql.Time val)` Convert from Time value to VarChar value.
`void` `fromTimestamp(java.sql.Timestamp val)` Convert from Timestamp value to VarChar value.
`java.io.InputStream` `toAsciiStream()` Convert the value of 'this' to an ascii stream
`boolean` `toBoolean()` Convert value to a Java Boolean
`byte` `toByte()` Convert value to a Java Byte
`byte[]` `toBytes()`
`java.io.Reader` `toCharacterStream()` Convert the value of 'this' to Reader
`java.sql.Date` `toDate()` Convert value to a Date
`java.math.BigDecimal` `toDecimal()` Convert value to a BigDecimal
`double` `toDouble()` Convert value to a Double
`float` `toFloat()` Convert value to a Float
`byte[]` `toIfx()` Convert value to Informix network format
`byte[]` `toIfxTuple()` Convert value to Informix tuple format
`java.io.InputStream` `toInputStream()`
`int` `toInt()` Convert value to a java.sql.Int
`long` `toLong()` Convert value to a Long
`java.lang.Object` `toObject()`
`short` `toShort()` Convert value to a java.sql.Short
`java.lang.String` `toString()` Convert value to a String type
`java.sql.Time` `toTime()` Convert Varchar value to a java.sql.Time value
`java.sql.Timestamp` `toTimestamp()` Convert Varchar value to a java.sql.Timestamp value

### Methods inherited from class com.informix.jdbc.IfxObject

`clear, clearWarning, fromBinaryStream, fromBinaryStream, fromBlob, fromClob, fromDecimal, fromIfx, fromIfx, fromIntervalDF, fromIntervalYM, fromNClob, fromObject, fromObject, fromObject, fromRowId, fromSQLXML, get_used_in_update, getEncodedLength, getWarning, isNull, nullify, set_used_in_update, setConnection, setExtendedTypeName, setIfxType, setTypeMap, toBinaryStream, toBlob, toClob, toIfxBSONObject, toInterval, toIntervalDF, toIntervalYM, toNClob, toObject, toRowId, toSQLXML, toUnloadString, unnullify`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### value

    protected java.lang.String value

The Varchar value

### Method Detail

#### toIfx

    public byte[] toIfx()
                 throws java.sql.SQLException

Convert value to Informix network format

Overrides:
  `toIfx` in class `IfxObject`
Returns:
  a byte array representation of this data type in Informix network format Get encoding to pass to JavaToIfxChar
Throws:
  `java.sql.SQLException`

#### toIfxTuple

    public byte[] toIfxTuple()
                      throws java.sql.SQLException

Convert value to Informix tuple format

Overrides:
  `toIfxTuple` in class `IfxObject`
Returns:
  a byte array representation of this data type in Informix tuple format Get encoding to pass to JavaToIfxChar
Throws:
  `java.sql.SQLException`

#### fromIfx

    public void fromIfx(byte[] b)
                 throws java.sql.SQLException

Set value of this data type to the given Informix network format

Overrides:
  `fromIfx` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### fromIfx

    public void fromIfx(byte[] b,
                        java.lang.String dbEnc)
                 throws java.sql.SQLException

Set value of this data type to the given Informix network format

Overrides:
  `fromIfx` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### fromIfx

    public void fromIfx(byte[] b,
                        int offset,
                        int length,
                        java.lang.String dbEnc)
                 throws java.sql.SQLException

Set value of this data type to the given Informix network format

Overrides:
  `fromIfx` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### fromIfx

    public void fromIfx(byte[] b,
                        int offset,
                        int length)
                 throws java.sql.SQLException

Set value of this data type to the given Informix network format

Overrides:
  `fromIfx` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toObject

    public java.lang.Object toObject()
                              throws java.sql.SQLException

Overrides:
  `toObject` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toBytes

    public byte[] toBytes()
                   throws java.sql.SQLException

Overrides:
  `toBytes` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toString

    public java.lang.String toString()

Convert value to a String type

Overrides:
  `toString` in class `IfxObject`
Returns:
  a String value representation of the VarChar column,

#### fromString

    public void fromString(java.lang.String str)
                    throws java.sql.SQLException

Convert value from a String type

Overrides:
  `fromString` in class `IfxObject`
Parameters:
  `a` - String value
Throws:
  `java.sql.SQLException`

#### fromString

    public void fromString(java.lang.String str,
                           boolean trimString)
                    throws java.sql.SQLException

Overrides:
  `fromString` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### fromBytes

    public void fromBytes(byte[] str)
                   throws java.sql.SQLException

Overrides:
  `fromBytes` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toByte

    public byte toByte()
                throws java.sql.SQLException

Convert value to a Java Byte

Overrides:
  `toByte` in class `IfxObject`
Returns:
  a java.lang.byte value representation of the VarChar column,
Throws:
  `java.sql.SQLException`

#### fromByte

    public void fromByte(java.lang.Byte b)
                  throws java.sql.SQLException

Convert from java Byte

Overrides:
  `fromByte` in class `IfxObject`
Parameters:
  `java` - Byte
Throws:
  `java.sql.SQLException`

#### fromByte

    public void fromByte(byte b)
                  throws java.sql.SQLException

Convert from java byte

Overrides:
  `fromByte` in class `IfxObject`
Parameters:
  `java` - byte
Throws:
  `java.sql.SQLException`

#### toBoolean

    public boolean toBoolean()
                      throws java.sql.SQLException

Convert value to a Java Boolean

Overrides:
  `toBoolean` in class `IfxObject`
Returns:
  a boolean value representation of the VarChar column,
Throws:
  `java.sql.SQLException`

#### fromBoolean

    public void fromBoolean(java.lang.Boolean b)
                     throws java.sql.SQLException

Convert from java Boolean

Overrides:
  `fromBoolean` in class `IfxObject`
Parameters:
  `java` - Boolean
Throws:
  `java.sql.SQLException`

#### fromBoolean

    public void fromBoolean(boolean b)
                     throws java.sql.SQLException

Convert from java boolean

Overrides:
  `fromBoolean` in class `IfxObject`
Parameters:
  `java` - boolean
Throws:
  `java.sql.SQLException`

#### toInt

    public int toInt()
              throws java.sql.SQLException

Convert value to a java.sql.Int

Overrides:
  `toInt` in class `IfxObject`
Returns:
  a java.sql.Int value representation of the VarChar column,
Throws:
  `java.sql.SQLException`

#### fromInt

    public void fromInt(java.lang.Integer I)
                 throws java.sql.SQLException

Convert from java.sql.Integer value.

Overrides:
  `fromInt` in class `IfxObject`
Parameters:
  `Integer` - the java.sql.Integer value
Throws:
  `java.sql.SQLException`

#### fromInt

    public void fromInt(int I)
                 throws java.sql.SQLException

Convert from integer value

Overrides:
  `fromInt` in class `IfxObject`
Parameters:
  `I` - the integer value
Throws:
  `java.sql.SQLException`

#### fromDecimal

    public void fromDecimal(java.math.BigDecimal B)
                     throws java.sql.SQLException

Convert to IfxVarChar from java big decimal

Overrides:
  `fromDecimal` in class `IfxObject`
Parameters:
  `B` - java big decimal to convert from
Throws:
  `java.sql.SQLException`

#### toShort

    public short toShort()
                  throws java.sql.SQLException

Convert value to a java.sql.Short

Overrides:
  `toShort` in class `IfxObject`
Returns:
  a java.sql.Short value representation of the VarChar column,
Throws:
  `java.sql.SQLException`

#### fromShort

    public void fromShort(java.lang.Short val)
                   throws java.sql.SQLException

Convert from Short value.

Overrides:
  `fromShort` in class `IfxObject`
Parameters:
  `Short` -
Throws:
  `java.sql.SQLException`

#### fromShort

    public void fromShort(short val)
                   throws java.sql.SQLException

Convert from short value.

Overrides:
  `fromShort` in class `IfxObject`
Parameters:
  `short` -
Throws:
  `java.sql.SQLException`

#### toLong

    public long toLong()
                throws java.sql.SQLException

Convert value to a Long

Overrides:
  `toLong` in class `IfxObject`
Returns:
  a java.sql.Long value representation of the VarChar column,
Throws:
  `java.sql.SQLException`

#### fromLong

    public void fromLong(java.lang.Long val)
                  throws java.sql.SQLException

Convert from Long value to VarChar value.

Overrides:
  `fromLong` in class `IfxObject`
Parameters:
  `Long` -
Throws:
  `java.sql.SQLException`

#### fromLong

    public void fromLong(long val)
                  throws java.sql.SQLException

Convert from Long value to VarChar value.

Overrides:
  `fromLong` in class `IfxObject`
Parameters:
  `Short` -
Throws:
  `java.sql.SQLException`

#### toFloat

    public float toFloat()
                  throws java.sql.SQLException

Convert value to a Float

Overrides:
  `toFloat` in class `IfxObject`
Returns:
  a java.sql.Float value representation of the VarChar column,
Throws:
  `java.sql.SQLException`

#### fromFloat

    public void fromFloat(java.lang.Float val)
                   throws java.sql.SQLException

Convert from Float value to VarChar value.

Overrides:
  `fromFloat` in class `IfxObject`
Parameters:
  `Float` -
Throws:
  `java.sql.SQLException`

#### fromFloat

    public void fromFloat(float val)
                   throws java.sql.SQLException

Convert from float value to VarChar value.

Overrides:
  `fromFloat` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toDate

    public java.sql.Date toDate()
                         throws java.sql.SQLException

Convert value to a Date

Overrides:
  `toDate` in class `IfxObject`
Returns:
  a java.sql.Date value representation of the VarChar column,
Throws:
  `java.sql.SQLException`

#### fromDate

    public void fromDate(java.sql.Date val)
                  throws java.sql.SQLException

Convert from Date value to VarChar value.

Overrides:
  `fromDate` in class `IfxObject`
Parameters:
  `java.sql.Date` -
Throws:
  `java.sql.SQLException`

#### toTime

    public java.sql.Time toTime()
                         throws java.sql.SQLException

Convert Varchar value to a java.sql.Time value

Overrides:
  `toTime` in class `IfxObject`
Returns:
  a java.sql.Time value representation of the VarChar column,
Throws:
  `java.sql.SQLException`

#### fromTime

    public void fromTime(java.sql.Time val)
                  throws java.sql.SQLException

Convert from Time value to VarChar value.

Overrides:
  `fromTime` in class `IfxObject`
Parameters:
  `java.sql.Time` -
Throws:
  `java.sql.SQLException`

#### toTimestamp

    public java.sql.Timestamp toTimestamp()
                                   throws java.sql.SQLException

Convert Varchar value to a java.sql.Timestamp value

Overrides:
  `toTimestamp` in class `IfxObject`
Returns:
  a java.sql.Timestamp value representation of the VarChar column,
Throws:
  `java.sql.SQLException`

#### fromTimestamp

    public void fromTimestamp(java.sql.Timestamp val)
                       throws java.sql.SQLException

Convert from Timestamp value to VarChar value.

Overrides:
  `fromTimestamp` in class `IfxObject`
Parameters:
  `java.sql.Timestamp` -
Throws:
  `java.sql.SQLException`

#### toDouble

    public double toDouble()
                    throws java.sql.SQLException

Convert value to a Double

Overrides:
  `toDouble` in class `IfxObject`
Returns:
  a java.sql.Double value representation of the VarChar column,
Throws:
  `java.sql.SQLException`

#### fromDouble

    public void fromDouble(java.lang.Double val)
                    throws java.sql.SQLException

Convert from Double value to VarChar value.

Overrides:
  `fromDouble` in class `IfxObject`
Parameters:
  `Double` -
Throws:
  `java.sql.SQLException`

#### fromDouble

    public void fromDouble(double val)
                    throws java.sql.SQLException

Convert from Double value to VarChar value.

Overrides:
  `fromDouble` in class `IfxObject`
Parameters:
  `Double` -
Throws:
  `java.sql.SQLException`

#### toDecimal

    public java.math.BigDecimal toDecimal()
                                   throws java.sql.SQLException

Convert value to a BigDecimal

Overrides:
  `toDecimal` in class `IfxObject`
Returns:
  a java.sql.BigDecimal value representation of VarChar column,
Throws:
  `java.sql.SQLException`

#### fromBigDecimal

    public void fromBigDecimal(java.math.BigDecimal val)
                        throws java.sql.SQLException

Convert from BigDecimal value to VarChar value.

Parameters:
  `BigDecimal` -
Throws:
  `java.sql.SQLException`

#### equals

    public boolean equals(java.lang.Object other)

Find out whether two objects are equal.

Overrides:
  `equals` in class `IfxObject`
Parameters:
  `other` - the other object to compare with
Returns:
  true if the objects are equal

#### toAsciiStream

    public java.io.InputStream toAsciiStream()
                                      throws java.sql.SQLException

Convert the value of 'this' to an ascii stream

Overrides:
  `toAsciiStream` in class `IfxObject`
Returns:
  the value converted to a java ascii stream
Throws:
  `java.sql.SQLException`

#### fromAsciiStream

    public void fromAsciiStream(java.io.InputStream x,
                                long length)
                         throws java.sql.SQLException

Overrides:
  `fromAsciiStream` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### fromAsciiStream

    public void fromAsciiStream(java.io.InputStream x,
                                int length)
                         throws java.sql.SQLException

Overrides:
  `fromAsciiStream` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### fromInputStream

    public void fromInputStream(java.io.InputStream x,
                                long length)
                         throws java.sql.SQLException

Overrides:
  `fromInputStream` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### fromInputStream

    public void fromInputStream(java.io.InputStream x,
                                int length)
                         throws java.sql.SQLException

Overrides:
  `fromInputStream` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toInputStream

    public java.io.InputStream toInputStream()
                                      throws java.sql.SQLException

Overrides:
  `toInputStream` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### fromCharacterStream

    public void fromCharacterStream(java.io.Reader reader,
                                    long length)
                             throws java.sql.SQLException

Overrides:
  `fromCharacterStream` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### fromCharacterStream

    public void fromCharacterStream(java.io.Reader x,
                                    int length)
                             throws java.sql.SQLException

Overrides:
  `fromCharacterStream` in class `IfxObject`
Throws:
  `java.sql.SQLException`

#### toCharacterStream

    public java.io.Reader toCharacterStream()
                                     throws java.sql.SQLException

Convert the value of 'this' to Reader

Overrides:
  `toCharacterStream` in class `IfxObject`
Returns:
  the value converted to a java.io.StringReader
Throws:
  `java.sql.SQLException`