Exemple #1
0
        /// <summary>
        /// Retrieves a stream to be used to write a stream of UTF-16 encoded
        /// characters to the <c>CLOB</c> value that this <c>IClob</c>
        /// object represents, at position <c>pos</c>.
        /// </summary>
        /// <param name="pos">
        /// The position at which to start writing to the <c>CLOB</c> value.
        /// </param>
        /// <returns>
        /// A <see cref="TextWriter"/> to which UTF-16 encoded
        /// characters can be written
        /// </returns>
        /// <exception cref="HsqlDataSourceException">
        /// If there is an error accessing the <c>CLOB</c> value.
        /// </exception>
        TextWriter IClob.SetCharacterStream(long pos)
        {
            lock (this)
            {
                CheckFree();

                try
                {
                    return(new JavaWriterWrapper(
                               m_clob.setCharacterStream(pos)));
                }
                catch (java.sql.SQLException se)
                {
                    throw new HsqlDataSourceException(se);
                }
                catch (java.lang.Exception e)
                {
                    throw new HsqlDataSourceException(e.toString(), e);
                }
            }
        }