Package org.hsqldb.lib

Examples of org.hsqldb.lib.HsqlByteArrayOutputStream.toByteArray()


        try {
            java.io.InputStream in = x.getBinaryStream();
            HsqlByteArrayOutputStream out = new HsqlByteArrayOutputStream(in,
                (int) length);

            setParameter(parameterIndex, out.toByteArray());
        } catch (IOException e) {
            throw Util.sqlException(ErrorCode.JDBC_INPUTSTREAM_ERROR,
                                    e.toString());
        }
    }
View Full Code Here


                if (length < 0) {
                    HsqlByteArrayOutputStream output;

                    output = new HsqlByteArrayOutputStream(x);

                    JDBCBlob blob = new JDBCBlob(output.toByteArray());

                    setBlobParameter(parameterIndex, blob);

                    return;
                }
View Full Code Here

            if (length < 0) {
                output = new HsqlByteArrayOutputStream(x);
            } else {
                output = new HsqlByteArrayOutputStream(x, (int) length);
            }
            setParameter(parameterIndex, output.toByteArray());
        } catch (IOException e) {
            throw Util.sqlException(ErrorCode.JDBC_INPUTSTREAM_ERROR,
                                    e.toString());
        }
    }
View Full Code Here

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

        return isBinary ? (Object) new BinaryData(os.toByteArray(), false)
                        : sb.toString();
    }

    Boolean compare(Session session, Object o) {
View Full Code Here

                out.write(buff, 0, read);

                left -= read;
            }

            setParameter(parameterIndex, out.toByteArray());
        } catch (IOException e) {
            throw Util.sqlException(Trace.INPUTSTREAM_ERROR, e.toString());
        } finally {
            if (out != null) {
                try {
View Full Code Here

                out.write(buff, 0, read);

                left -= read;
            }

            setParameter(i, out.toByteArray());
        } catch (IOException e) {
            throw Util.sqlException(Trace.INPUTSTREAM_ERROR, e.toString());
        } finally {
            if (out != null) {
                try {
View Full Code Here

        try {
            java.io.InputStream in = x.getBinaryStream();
            HsqlByteArrayOutputStream out = new HsqlByteArrayOutputStream(in,
                (int) length);

            setParameter(parameterIndex, out.toByteArray());
        } catch (Throwable e) {
            throw JDBCUtil.sqlException(ErrorCode.JDBC_INPUTSTREAM_ERROR,
                                    e.toString(), e);
        }
    }
View Full Code Here

            if (length < 0) {
                output = new HsqlByteArrayOutputStream(x);
            } else {
                output = new HsqlByteArrayOutputStream(x, (int) length);
            }
            setParameter(parameterIndex, output.toByteArray());
        } catch (Throwable e) {
            throw JDBCUtil.sqlException(ErrorCode.JDBC_INPUTSTREAM_ERROR,
                                    e.toString(), e);
        }
    }
View Full Code Here

        try {
            java.io.InputStream in = x.getBinaryStream();
            HsqlByteArrayOutputStream out = new HsqlByteArrayOutputStream(in,
                (int) length);

            setParameter(parameterIndex, out.toByteArray());
        } catch (Throwable e) {
            throw Util.sqlException(ErrorCode.JDBC_INPUTSTREAM_ERROR,
                                    e.toString());
        }
    }
View Full Code Here

            if (length < 0) {
                output = new HsqlByteArrayOutputStream(x);
            } else {
                output = new HsqlByteArrayOutputStream(x, (int) length);
            }
            setParameter(parameterIndex, output.toByteArray());
        } catch (Throwable e) {
            throw Util.sqlException(ErrorCode.JDBC_INPUTSTREAM_ERROR,
                                    e.toString());
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.