Package org.hsqldb.types

Examples of org.hsqldb.types.Binary


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

        return new Binary(Column.hexToByteArray(s), false);
    }
View Full Code Here


                case Types.VARBINARY :
                case Types.LONGVARBINARY :
                    if (o instanceof Binary) {
                        return o;
                    } else if (o instanceof byte[]) {
                        return new Binary((byte[]) o, false);
                    } else if (o instanceof String) {

                        /**
                         * @todo fredt - we need this for script processing only
                         *  handle the script separately and process normal
                         *  conversion according to rules in SQL
                         *  standard
                         */
                        return new Binary(
                            StringConverter.hexToByte((String) o), false);
                    }

                    throw Trace.error(Trace.INVALID_CONVERSION,
                                      Types.getTypeString(type));
View Full Code Here

      case -4:
      case -3:
      case -2:
        if (!(paramObject instanceof byte[]))
          throw Util.sqlException(Trace.error(95));
        paramObject = new Binary((byte[])paramObject, !this.connection.isNetConn);
        break;
      case 91:
        if ((paramObject instanceof java.util.Date))
        {
          l = HsqlDateTime.getNormalisedDate(((java.util.Date)paramObject).getTime());
View Full Code Here

      case -3:
      case -2:
        if ((paramObject instanceof Binary))
          return paramObject;
        if ((paramObject instanceof byte[]))
          return new Binary((byte[])paramObject, false);
        if ((paramObject instanceof String))
          return new Binary(StringConverter.hexToByte((String)paramObject), false);
        throw Trace.error(95, Types.getTypeString(paramInt));
      case 1111:
        if ((paramObject instanceof JavaObject))
          return paramObject;
        if ((paramObject instanceof String))
View Full Code Here

    if (str == null)
      return null;
    str = str.trim();
    if (str.length() == 0)
      return null;
    return new Binary(Column.hexToByteArray(str), false);
  }
View Full Code Here

  }

  protected Binary readBinary(int paramInt)
    throws IOException, HsqlException
  {
    return new Binary(readByteArray(), false);
  }
View Full Code Here

    throws IOException, HsqlException
  {
    String str = readField();
    if (str == null)
      return null;
    return new Binary(Column.hexToByteArray(str), false);
  }
View Full Code Here

TOP

Related Classes of org.hsqldb.types.Binary

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.