Package org.hsqldb_voltpatches.types

Examples of org.hsqldb_voltpatches.types.BinaryData


                return exp;
            }

            // convert binary values to hex
            if (valueData instanceof BinaryData) {
                BinaryData bd = (BinaryData) valueData;
                exp.attributes.put("value", hexEncode(bd.getBytes()));
                return exp;
            }

            // Otherwise just string format the value.
            exp.attributes.put("value", valueData.toString());
View Full Code Here


        if (o == null) {
            return null;
        }

        if (isBinary) {
            return new BinaryData(session, (BinaryData) o, maxByteValue);
        } else {
            return dataType.concat(session, o, "\uffff");
        }
    }
View Full Code Here

        if (i == 0) {
            return null;
        }

        return isBinary ? new BinaryData(os.toByteArray(), false)
                        : sb.toString();
    }
View Full Code Here

                } else if (dataType.isBinaryType()) {
                    funcType = FUNC_TRIM_BINARY;

                    if (nodes[1] == null) {
                        nodes[1] = new ExpressionValue(
                            new BinaryData(new byte[]{ 0 }, false),
                            Type.SQL_BINARY);
                    }
                } else {
                    throw Error.error(ErrorCode.X_42565);
                }
View Full Code Here

                    if (outType.precision == 1) {
                        byte[] bytes = ((Boolean) o).booleanValue()
                                       ? new byte[] { -0x80 }
                                       : new byte[] { 0 };

                        o = new BinaryData(bytes, 1);

                        break;
                    }
                    Util.throwError(Error.error(ErrorCode.X_42565));
                }

                try {
                    if (o instanceof byte[]) {
                        o = outType.convertToDefaultType(
                            connection.sessionProxy, o);

                        break;
                    }

                    if (o instanceof String) {
                        o = outType.convertToDefaultType(
                            connection.sessionProxy, o);

                        break;
                    }
                } catch (HsqlException e) {
                    Util.throwError(e);
                }
                Util.throwError(Error.error(ErrorCode.X_42565));

            // $FALL-THROUGH$
            case Types.SQL_BINARY :
            case Types.SQL_VARBINARY :
                if (o instanceof byte[]) {
                    o = new BinaryData((byte[]) o, !connection.isNetConn);

                    break;
                }

                try {
View Full Code Here

            }

            break;
        }

        token.tokenValue = new BinaryData(byteOutputStream.toByteArray(),
                                          false);

        byteOutputStream.reset(byteBuffer);
    }
View Full Code Here

            }

            break;
        }

        token.tokenValue = new BinaryData(map.getBytes(), map.size());
    }
View Full Code Here

        if (token.isMalformed) {
            throw Error.error(ErrorCode.X_22018);
        }

        BinaryData data = new BinaryData(byteOutputStream.toByteArray(),
                                         false);

        byteOutputStream.reset(byteBuffer);

        return data;
View Full Code Here

            }
        }

        map.setSize(bitIndex);

        return new BinaryData(map.getBytes(), map.size());
    }
View Full Code Here

        if (s == null) {
            return null;
        }

        BinaryData data = scanner.convertToBinary(s);

        if (data.length(null) == 0) {
            return null;
        }

        return new JavaObjectData(data.getBytes());
    }
View Full Code Here

TOP

Related Classes of org.hsqldb_voltpatches.types.BinaryData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.