IT. Expert System.

Android Reference

Clob


java.sql

Interface Clob

  • All Known Subinterfaces:
    NClob


    public interface Clob
    A Java interface mapping for the SQL CLOB type.

    An SQL CLOB type stores a large array of characters as the value in a column of a database.

    The java.sql.Clob interface provides methods for setting and retrieving data in the Clob, for querying Clob data length, for searching for data within the Clob.

    • Method Summary

      Methods
      Modifier and Type Method and Description
      void free()
      Frees any resources held by this clob.
      InputStream getAsciiStream()
      Gets the value of this Clob object as an ASCII stream.
      Reader getCharacterStream()
      Gets the data of this Clob object in a java.io.Reader.
      Reader getCharacterStream(long pos, long length)
      Returns a Reader that reads length characters from this clob, starting at 1-based offset {code pos}.
      String getSubString(long pos, int length)
      Gets a copy of a specified substring in this Clob.
      long length()
      Retrieves the number of characters in this Clob object.
      long position(Clob searchstr, long start)
      Retrieves the character position at which a specified Clob object appears in this Clob object.
      long position(String searchstr, long start)
      Retrieves the character position at which a specified substring appears in this Clob object.
      OutputStream setAsciiStream(long pos)
      Retrieves a stream which can be used to write Ascii characters to this Clob object, starting at specified position.
      Writer setCharacterStream(long pos)
      Retrieves a stream which can be used to write a stream of unicode characters to this Clob object, at a specified position.
      int setString(long pos, String str)
      Writes a given Java String to this Clob object at a specified position.
      int setString(long pos, String str, int offset, int len)
      Writes len characters of a string, starting at a specified character offset, to this Clob.
      void truncate(long len)
      Truncates this Clob after the specified number of characters.
    • Method Detail

      • getAsciiStream

        InputStream getAsciiStream()
                                   throws SQLException
        Gets the value of this Clob object as an ASCII stream.
        Returns:
        an ASCII InputStream giving access to the Clob data.
        Throws:
        SQLException - if an error occurs accessing the Clob.
      • getCharacterStream

        Reader getCharacterStream()
                                  throws SQLException
        Gets the data of this Clob object in a java.io.Reader.
        Returns:
        a character stream Reader object giving access to the Clob data.
        Throws:
        SQLException - if an error occurs accessing the Clob.
      • getSubString

        String getSubString(long pos,
                          int length)
                            throws SQLException
        Gets a copy of a specified substring in this Clob.
        Parameters:
        pos - the index of the start of the substring in the Clob.
        length - the length of the data to retrieve.
        Returns:
        A string containing the requested data.
        Throws:
        SQLException - if an error occurs accessing the Clob.
      • length

        long length()
                    throws SQLException
        Retrieves the number of characters in this Clob object.
        Returns:
        a long value with the number of character in this Clob.
        Throws:
        SQLException - if an error occurs accessing the Clob.
      • position

        long position(Clob searchstr,
                    long start)
                      throws SQLException
        Retrieves the character position at which a specified Clob object appears in this Clob object.
        Parameters:
        searchstr - the specified Clob to search for.
        start - the position within this Clob to start the search
        Returns:
        a long value with the position at which the specified Clob occurs within this Clob.
        Throws:
        SQLException - if an error occurs accessing the Clob.
      • position

        long position(String searchstr,
                    long start)
                      throws SQLException
        Retrieves the character position at which a specified substring appears in this Clob object.
        Parameters:
        searchstr - the string to search for.
        start - the position at which to start the search within this Clob.
        Returns:
        a long value with the position at which the specified string occurs within this Clob.
        Throws:
        SQLException - if an error occurs accessing the Clob.
      • setAsciiStream

        OutputStream setAsciiStream(long pos)
                                    throws SQLException
        Retrieves a stream which can be used to write Ascii characters to this Clob object, starting at specified position.
        Parameters:
        pos - the position at which to start the writing.
        Returns:
        an OutputStream which can be used to write ASCII characters to this Clob.
        Throws:
        SQLException - if an error occurs accessing the Clob.
      • setCharacterStream

        Writer setCharacterStream(long pos)
                                  throws SQLException
        Retrieves a stream which can be used to write a stream of unicode characters to this Clob object, at a specified position.
        Parameters:
        pos - the position at which to start the writing.
        Returns:
        a Writer which can be used to write unicode characters to this Clob.
        Throws:
        SQLException - if an error occurs accessing the Clob.
      • setString

        int setString(long pos,
                    String str)
                      throws SQLException
        Writes a given Java String to this Clob object at a specified position.
        Parameters:
        pos - the position at which to start the writing.
        str - the string to write.
        Returns:
        the number of characters written.
        Throws:
        SQLException - if an error occurs accessing the Clob.
      • setString

        int setString(long pos,
                    String str,
                    int offset,
                    int len)
                      throws SQLException
        Writes len characters of a string, starting at a specified character offset, to this Clob.
        Parameters:
        pos - the position at which to start the writing.
        str - the String to write.
        offset - the offset within str to start writing from.
        len - the number of characters to write.
        Returns:
        the number of characters written.
        Throws:
        SQLException - if an error occurs accessing the Clob.
      • truncate

        void truncate(long len)
                      throws SQLException
        Truncates this Clob after the specified number of characters.
        Parameters:
        len - the length in characters giving the place to truncate this Clob.
        Throws:
        SQLException - if an error occurs accessing the Clob.
      • free

        void free()
                  throws SQLException
        Frees any resources held by this clob. After free is called, calling method other than free will throw SQLException (calling free repeatedly will do nothing).
        Throws:
        SQLException
      • getCharacterStream

        Reader getCharacterStream(long pos,
                                long length)
                                  throws SQLException
        Returns a Reader that reads length characters from this clob, starting at 1-based offset {code pos}.
        Throws:
        SQLException


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1907 / . Delta: 0.03340 с