Class ClobImpl

    • Constructor Detail

      • ClobImpl

        public ClobImpl()
      • ClobImpl

        public ClobImpl​(InputStreamFactory streamFactory,
                        long length)
        Creates a new ClobImpl. Note that the length is not taken from the InputStreamFactory since it refers to bytes and not chars.
        Parameters:
        streamFactory -
        length -
      • ClobImpl

        public ClobImpl​(char[] chars)
      • ClobImpl

        public ClobImpl​(String str)
    • Method Detail

      • length

        public long length()
                    throws SQLException
        Returns the number of characters in the CLOB value designated by this Clob object.
        Specified by:
        length in interface Clob
        Overrides:
        length in class BaseLob
        Returns:
        length of the CLOB in characters
        Throws:
        SQLException
      • position

        public long position​(Clob searchstr,
                             long start)
                      throws SQLException
        Determines the character position at which the specified Clob object searchstr appears in this Clob object. The search begins at position start.
        Specified by:
        position in interface Clob
        Parameters:
        searchstr - the Clob object for which to search
        start - the position at which to begin searching; the first position is 1
        Returns:
        the position at which the Clob object appears, else -1; the first position is 1
        Throws:
        SQLException
      • position

        public long position​(String searchstr,
                             long start)
                      throws SQLException
        Determines the character position at which the specified substring searchstr appears in the SQL CLOB value represented by this Clob object. The search begins at position start.
        Specified by:
        position in interface Clob
        Parameters:
        searchstr - the substring for which to search
        start - the position at which to begin searching; the first position is 1
        Returns:
        the position at which the substring appears, else -1; the first position is 1
        Throws:
        SQLException - if there is an error accessing the CLOB value
      • createClob

        public static Clob createClob​(char[] chars)