|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.firebirdsql.gds.XSQLVAR
public class XSQLVAR
The class XSQLDA is a java mapping of the XSQLVAR server
data structure used to represent one column for input and output.
| Field Summary | |
|---|---|
String |
aliasname
|
protected Encoding |
coder
|
String |
ownname
|
String |
relname
|
byte[] |
sqldata
|
int |
sqllen
|
String |
sqlname
|
int |
sqlscale
|
int |
sqlsubtype
|
int |
sqltype
|
| Constructor Summary | |
|---|---|
XSQLVAR()
|
|
| Method Summary | |
|---|---|
void |
copyFrom(XSQLVAR original)
Copy constructor. |
void |
copyFrom(XSQLVAR original,
boolean copyData)
Copy constructor. |
Date |
decodeDate(byte[] byte_int)
Decode a byte array into a Date value. |
Date |
decodeDate(Date d,
Calendar cal)
Decode a Date value using a given Calendar. |
double |
decodeDouble(byte[] byte_int)
Decode a byte array into a double value. |
float |
decodeFloat(byte[] byte_int)
Decode a byte array into a float value. |
int |
decodeInt(byte[] byte_int)
Decode a byte array into an int value. |
long |
decodeLong(byte[] byte_int)
Decode a byte array into a long value. |
short |
decodeShort(byte[] byte_int)
Decode a byte array into a short value. |
String |
decodeString(byte[] value,
String encoding,
String mappingPath)
Decode an encoded byte array into a String
using a given encoding. |
Time |
decodeTime(byte[] int_byte)
Decode a byte array into a Time value. |
Time |
decodeTime(Time d,
Calendar cal,
boolean invertTimeZone)
Decode a Time value using a given Calendar. |
Timestamp |
decodeTimestamp(byte[] byte_int)
Decode a byte array into a Timestamp. |
Timestamp |
decodeTimestamp(Timestamp value,
Calendar cal)
Decode a Timestamp value using a given
Calendar. |
Timestamp |
decodeTimestamp(Timestamp value,
Calendar cal,
boolean invertTimeZone)
Decode a Timestamp value using a given
Calendar. |
XSQLVAR |
deepCopy()
Get a deep copy of this object. |
byte[] |
encodeDate(Date d)
Encode a Date value into a byte array. |
Date |
encodeDate(Date d,
Calendar cal)
Encode a given Date value using a given
Calendar. |
byte[] |
encodeDouble(double value)
Encode a double value as a byte array. |
byte[] |
encodeFloat(float value)
Encode a float value as a byte array. |
byte[] |
encodeInt(int value)
Encode an int value as a byte array. |
byte[] |
encodeLong(long value)
Encode a long value as a byte array. |
byte[] |
encodeShort(short value)
Encode a short value as a byte array. |
byte[] |
encodeString(byte[] value,
String encoding,
String mappingPath)
Encode a byte array using a given encoding. |
byte[] |
encodeString(String value,
String encoding,
String mappingPath)
Encode a String value into a byte array using
a given encoding. |
byte[] |
encodeTime(Time d)
Encode a Time value into a byte array. |
Time |
encodeTime(Time d,
Calendar cal,
boolean invertTimeZone)
Encode a given Time value using a given
Calendar. |
byte[] |
encodeTimestamp(Timestamp value)
Encode a Timstamp as a byte array. |
Timestamp |
encodeTimestamp(Timestamp value,
Calendar cal)
Encode a Timestamp using a given Calendar. |
Timestamp |
encodeTimestamp(Timestamp value,
Calendar cal,
boolean invertTimeZone)
Encode a Timestamp using a given Calendar. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int sqltype
public int sqlscale
public int sqlsubtype
public int sqllen
public byte[] sqldata
public String sqlname
public String relname
public String ownname
public String aliasname
protected Encoding coder
| Constructor Detail |
|---|
public XSQLVAR()
| Method Detail |
|---|
public XSQLVAR deepCopy()
public void copyFrom(XSQLVAR original)
XSQLVAR with
values from another instance.
original - The other instance of XSQLVAR to be used
as the base for initializing this instance
public void copyFrom(XSQLVAR original,
boolean copyData)
XSQLVAR with
values from another instance.
original - The other instance of XSQLVAR to be used
as the base for initializing this instancepublic byte[] encodeShort(short value)
short value as a byte array.
value - The value to be encoded
value encoded as a
byte arraypublic short decodeShort(byte[] byte_int)
byte array into a short value.
byte_int - The byte array to be decoded
short value of the decoded
byte arraypublic byte[] encodeInt(int value)
int value as a byte array.
value - The value to be encoded
value encoded as a
byte arraypublic int decodeInt(byte[] byte_int)
byte array into an int value.
byte_int - The byte array to be decoded
int value of the decoded
byte arraypublic byte[] encodeLong(long value)
long value as a byte array.
value - The value to be encoded
value encoded as a
byte arraypublic long decodeLong(byte[] byte_int)
byte array into a long value.
byte_int - The byte array to be decoded
long value of the decoded
byte arraypublic byte[] encodeFloat(float value)
float value as a byte array.
value - The value to be encoded
value encoded as a
byte arraypublic float decodeFloat(byte[] byte_int)
byte array into a float value.
byte_int - The byte array to be decoded
float value of the decoded
byte arraypublic byte[] encodeDouble(double value)
double value as a byte array.
value - The value to be encoded
value encoded as a
byte arraypublic double decodeDouble(byte[] byte_int)
byte array into a double value.
byte_int - The byte array to be decoded
double value of the decoded
byte array
public byte[] encodeString(String value,
String encoding,
String mappingPath)
throws SQLException
String value into a byte array using
a given encoding.
value - The String to be encodedencoding - The encoding to use in the encoding processmappingPath - The character mapping path to be used in the encoding
value as a byte array
SQLException - if the given encoding cannot be found, or an error
occurs during the encoding
public byte[] encodeString(byte[] value,
String encoding,
String mappingPath)
throws SQLException
byte array using a given encoding.
value - The byte array to be encodedencoding - The encoding to use in the encoding processmappingPath - The character mapping path to be used in the encoding
value encoded using the given encoding
SQLException - if the given encoding cannot be found, or an error
occurs during the encoding
public String decodeString(byte[] value,
String encoding,
String mappingPath)
throws SQLException
byte array into a String
using a given encoding.
value - The value to be decodedencoding - The encoding to be used in the decoding processmappingPath - The character mapping path to be used in the decoding
String
SQLException - if the given encoding cannot be found, or an
error occurs during the decoding
public Timestamp encodeTimestamp(Timestamp value,
Calendar cal)
Timestamp using a given Calendar.
value - The Timestamp to be encodedcal - The Calendar to be used for encoding,
may be null
public Timestamp encodeTimestamp(Timestamp value,
Calendar cal,
boolean invertTimeZone)
Timestamp using a given Calendar.
value - The Timestamp to be encodedcal - The Calendar to be used for encoding,
may be nullinvertTimeZone - If true, the timezone offset value
will be subtracted from the encoded value, otherwise it will
be added
Timestamppublic byte[] encodeTimestamp(Timestamp value)
Timstamp as a byte array.
value - The Timstamp to be encoded
bytes that represents the given
Timestamp value
public Timestamp decodeTimestamp(Timestamp value,
Calendar cal)
Timestamp value using a given
Calendar.
value - The Timestamp to be decodedcal - The Calendar to be used in decoding,
may be null
Timestamp
public Timestamp decodeTimestamp(Timestamp value,
Calendar cal,
boolean invertTimeZone)
Timestamp value using a given
Calendar.
value - The Timestamp to be decodedcal - The Calendar to be used in decoding,
may be nullinvertTimeZone - If true, the timezone offset value
will be subtracted from the decoded value, otherwise it will
be added
Timestamppublic Timestamp decodeTimestamp(byte[] byte_int)
byte array into a Timestamp.
byte_int - The byte array to be decoded
Timestamp value from the decoded
bytes
public Time encodeTime(Time d,
Calendar cal,
boolean invertTimeZone)
Time value using a given
Calendar.
d - The Time to be encodedcal - The Calendar to be used in the encoding,
may be null
Timepublic byte[] encodeTime(Time d)
Time value into a byte array.
d - The Time to be encoded
bytes representing the given
Time
public Time decodeTime(Time d,
Calendar cal,
boolean invertTimeZone)
Time value using a given Calendar.
d - The Time to be decodedcal - The Calendar to be used in the decoding, may
be null
Timepublic Time decodeTime(byte[] int_byte)
byte array into a Time value.
int_byte - The byte array to be decoded
Time
public Date encodeDate(Date d,
Calendar cal)
Date value using a given
Calendar.
d - The Date to be encodedcal - The Calendar to be used in the encoding,
may be null
Datepublic byte[] encodeDate(Date d)
Date value into a byte array.
d - The Date to be encoded
bytes representing the given
Date
public Date decodeDate(Date d,
Calendar cal)
Date value using a given Calendar.
d - The Date to be decodedcal - The Calendar to be used in the decoding, may
be null
Datepublic Date decodeDate(byte[] byte_int)
byte array into a Date value.
byte_int - The byte array to be decoded
Date
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||