|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.firebirdsql.gds.XSQLVAR
org.firebirdsql.gds.impl.jni.XSQLVARImpl
org.firebirdsql.gds.impl.jni.XSQLVARLittleEndianImpl
public class XSQLVARLittleEndianImpl
Implementation of XSQLVAR class for little-endian platforms (like
Windows, x86 Linux, x86 FreeBSD, etc).
| Field Summary |
|---|
| Fields inherited from class org.firebirdsql.gds.XSQLVAR |
|---|
aliasname, coder, ownname, relname, sqldata, sqllen, sqlname, sqlscale, sqlsubtype, sqltype |
| Constructor Summary | |
|---|---|
XSQLVARLittleEndianImpl()
Create default instance of this class. |
|
XSQLVARLittleEndianImpl(int sqltype,
int sqlscale,
int sqlsubtype,
int sqllen,
byte[] sqldata,
String sqlname,
String relname,
String ownname,
String aliasname)
Create instance of this class for the specified XSQLVAR parameters. |
|
| Method Summary | |
|---|---|
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)
|
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. |
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)
|
byte[] |
encodeTimestamp(Timestamp value)
Encode a Timstamp as a byte array. |
Timestamp |
encodeTimestamp(Timestamp value,
Calendar cal)
Encode a Timestamp using a given Calendar. |
| Methods inherited from class org.firebirdsql.gds.XSQLVAR |
|---|
copyFrom, copyFrom, decodeTime, decodeTimestamp, encodeTime, encodeTimestamp |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XSQLVARLittleEndianImpl()
public XSQLVARLittleEndianImpl(int sqltype,
int sqlscale,
int sqlsubtype,
int sqllen,
byte[] sqldata,
String sqlname,
String relname,
String ownname,
String aliasname)
| Method Detail |
|---|
public XSQLVAR deepCopy()
XSQLVAR
deepCopy in class XSQLVARpublic byte[] encodeShort(short value)
XSQLVARshort value as a byte array.
encodeShort in class XSQLVARvalue - The value to be encoded
value encoded as a
byte arraypublic short decodeShort(byte[] byte_int)
XSQLVARbyte array into a short value.
decodeShort in class XSQLVARbyte_int - The byte array to be decoded
short value of the decoded
byte arraypublic byte[] encodeInt(int value)
XSQLVARint value as a byte array.
encodeInt in class XSQLVARvalue - The value to be encoded
value encoded as a
byte arraypublic int decodeInt(byte[] byte_int)
XSQLVARbyte array into an int value.
decodeInt in class XSQLVARbyte_int - The byte array to be decoded
int value of the decoded
byte arraypublic byte[] encodeLong(long value)
XSQLVARlong value as a byte array.
encodeLong in class XSQLVARvalue - The value to be encoded
value encoded as a
byte arraypublic long decodeLong(byte[] byte_int)
XSQLVARbyte array into a long value.
decodeLong in class XSQLVARbyte_int - The byte array to be decoded
long value of the decoded
byte arraypublic byte[] encodeFloat(float value)
XSQLVARfloat value as a byte array.
encodeFloat in class XSQLVARvalue - The value to be encoded
value encoded as a
byte arraypublic float decodeFloat(byte[] byte_int)
XSQLVARbyte array into a float value.
decodeFloat in class XSQLVARbyte_int - The byte array to be decoded
float value of the decoded
byte arraypublic byte[] encodeDouble(double value)
XSQLVARdouble value as a byte array.
encodeDouble in class XSQLVARvalue - The value to be encoded
value encoded as a
byte arraypublic double decodeDouble(byte[] byte_int)
XSQLVARbyte array into a double value.
decodeDouble in class XSQLVARbyte_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
XSQLVARString value into a byte array using
a given encoding.
encodeString in class XSQLVARvalue - 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
XSQLVARbyte array using a given encoding.
encodeString in class XSQLVARvalue - 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
XSQLVARbyte array into a String
using a given encoding.
decodeString in class XSQLVARvalue - 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)
XSQLVARTimestamp using a given Calendar.
encodeTimestamp in class XSQLVARvalue - The Timestamp to be encodedcal - The Calendar to be used for encoding,
may be nullpublic byte[] encodeTimestamp(Timestamp value)
XSQLVARTimstamp as a byte array.
encodeTimestamp in class XSQLVARvalue - The Timstamp to be encoded
bytes that represents the given
Timestamp value
public Timestamp decodeTimestamp(Timestamp value,
Calendar cal)
XSQLVARTimestamp value using a given
Calendar.
decodeTimestamp in class XSQLVARvalue - The Timestamp to be decodedcal - The Calendar to be used in decoding,
may be null
Timestamppublic Timestamp decodeTimestamp(byte[] byte_int)
XSQLVARbyte array into a Timestamp.
decodeTimestamp in class XSQLVARbyte_int - The byte array to be decoded
Timestamp value from the decoded
bytes
public Time encodeTime(Time d,
Calendar cal)
public byte[] encodeTime(Time d)
XSQLVARTime value into a byte array.
encodeTime in class XSQLVARd - The Time to be encoded
bytes representing the given
Time
public Time decodeTime(Time d,
Calendar cal)
public Time decodeTime(byte[] int_byte)
XSQLVARbyte array into a Time value.
decodeTime in class XSQLVARint_byte - The byte array to be decoded
Time
public Date encodeDate(Date d,
Calendar cal)
XSQLVARDate value using a given
Calendar.
encodeDate in class XSQLVARd - The Date to be encodedcal - The Calendar to be used in the encoding,
may be null
Datepublic byte[] encodeDate(Date d)
XSQLVARDate value into a byte array.
encodeDate in class XSQLVARd - The Date to be encoded
bytes representing the given
Date
public Date decodeDate(Date d,
Calendar cal)
XSQLVARDate value using a given Calendar.
decodeDate in class XSQLVARd - The Date to be decodedcal - The Calendar to be used in the decoding, may
be null
Datepublic Date decodeDate(byte[] byte_int)
XSQLVARbyte array into a Date value.
decodeDate in class XSQLVARbyte_int - The byte array to be decoded
Date
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||