home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / sql / ClobLocator.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.3 KB  |  54 lines

  1. /*
  2.  * @(#)ClobLocator.java    1.3 98/03/18
  3.  *
  4.  * Copyright 1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.sql;
  16.  
  17. /**
  18.  * JDBC 2.0
  19.  *
  20.  * <p>A ClobLocator is a transaction duration reference to a character large 
  21.  * object in the DBMS server.
  22.  */
  23.  
  24. public interface ClobLocator {
  25.  
  26.   /**
  27.   * The length of the Character Large Object in characters.
  28.   *
  29.   * @return length of the CLOB in characters
  30.   */
  31.   long length();
  32.  
  33.   /**
  34.   * Return copy of the substring of the CLOB at the requested position.
  35.   *
  36.   * @param pos is the first character of the substring to be extracted.
  37.   * @param length is the number of consecutive character to be copied.
  38.   *
  39.   * @return a byte array containing a substring of the CLOB
  40.   */
  41.   String getString(int pos, int length); 
  42.  
  43.   /**
  44.   * @return a stream containing the CLOB data
  45.   */
  46.   java.io.Reader getCharacterStream ();
  47.  
  48.   /**
  49.   * @return a stream containing the CLOB data
  50.   */
  51.   java.io.InputStream getAsciiStream ();
  52.  
  53. }
  54.