public void setBytes(int parameterIndex, byte[] x) throws  SQLException { XSQLVAR sqlvar = fixedStmt.getInSqlda().sqlvar[parameterIndex - 1];  if ((sqlvar.sqltype & ~1) == GDS.SQL_BLOB) { setBinaryStream(parameterIndex, new ByteArrayInputStream(x), x.length); return; }  if (x.length > sqlvar.sqllen) { throw new DataTruncation(parameterIndex, true, false, x.length, sqlvar.sqllen); } if ((sqlvar.sqltype & ~1) == GDS.SQL_TEXT) { if (x.length == sqlvar.sqllen) { sqlvar.sqlind = 0; sqlvar.sqldata = x; return; }  byte[] padded = new byte[sqlvar.sqllen]; System.arraycopy(x, 0, padded, 0, x.length); sqlvar.sqlind = 0; sqlvar.sqldata = padded; return; } if ((sqlvar.sqltype & ~1) == GDS.SQL_VARYING) { sqlvar.sqlind = 0; sqlvar.sqldata = x; return; }
public void setBytes(int parameterIndex, byte[] x) throws SQLException { getField(parameterIndex).setBytes(x);
    public void setBytes(int parameterIndex, byte[] x) throws  SQLException {        XSQLVAR sqlvar = fixedStmt.getInSqlda().sqlvar[parameterIndex - 1];        //Added to allow input to blobs        if ((sqlvar.sqltype & ~1) == GDS.SQL_BLOB) {            setBinaryStream(parameterIndex, new ByteArrayInputStream(x), x.length);            return;        }        //otherwise, a string, check length is ok.        if (x.length > sqlvar.sqllen) {            throw new DataTruncation(parameterIndex, true, false, x.length, sqlvar.sqllen);        }        if ((sqlvar.sqltype & ~1) == GDS.SQL_TEXT) {            if (x.length == sqlvar.sqllen) {                sqlvar.sqlind = 0;                sqlvar.sqldata = x;                return;            }            //else pad with nulls            byte[] padded = new byte[sqlvar.sqllen];            System.arraycopy(x, 0, padded, 0, x.length);            sqlvar.sqlind = 0;            sqlvar.sqldata = padded;            return;        }        if ((sqlvar.sqltype & ~1) == GDS.SQL_VARYING) {            sqlvar.sqlind = 0;            sqlvar.sqldata = x;            return;        }    }