Class Clob

java.lang.Object
com.mysql.cj.jdbc.Clob
All Implemented Interfaces:
OutputStreamWatcher, WriterWatcher, java.sql.Clob
Direct Known Subclasses:
NClob

public class Clob
extends java.lang.Object
implements java.sql.Clob, OutputStreamWatcher, WriterWatcher
Simplistic implementation of java.sql.Clob for MySQL Connector/J
  • Constructor Summary

    Constructors 
    Constructor Description
    Clob​(java.lang.String charDataInit, ExceptionInterceptor exceptionInterceptor)  
  • Method Summary

    Modifier and Type Method Description
    void free()  
    java.io.InputStream getAsciiStream()  
    java.io.Reader getCharacterStream()  
    java.io.Reader getCharacterStream​(long pos, long length)  
    java.lang.String getSubString​(long startPos, int length)  
    long length()  
    long position​(java.lang.String stringToFind, long startPos)  
    long position​(java.sql.Clob arg0, long arg1)  
    java.io.OutputStream setAsciiStream​(long indexToWriteAt)  
    java.io.Writer setCharacterStream​(long indexToWriteAt)  
    int setString​(long pos, java.lang.String str)  
    int setString​(long pos, java.lang.String str, int offset, int len)  
    void streamClosed​(WatchableStream out)
    Called when the OutputStream being watched has .close() called
    void truncate​(long length)  
    void writerClosed​(char[] charDataBeingWritten)  
    void writerClosed​(WatchableWriter out)
    Called when the Writer being watched has .close() called

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getAsciiStream

      public java.io.InputStream getAsciiStream() throws java.sql.SQLException
      Specified by:
      getAsciiStream in interface java.sql.Clob
      Throws:
      java.sql.SQLException
    • getCharacterStream

      public java.io.Reader getCharacterStream() throws java.sql.SQLException
      Specified by:
      getCharacterStream in interface java.sql.Clob
      Throws:
      java.sql.SQLException
    • getSubString

      public java.lang.String getSubString​(long startPos, int length) throws java.sql.SQLException
      Specified by:
      getSubString in interface java.sql.Clob
      Throws:
      java.sql.SQLException
    • length

      public long length() throws java.sql.SQLException
      Specified by:
      length in interface java.sql.Clob
      Throws:
      java.sql.SQLException
    • position

      public long position​(java.sql.Clob arg0, long arg1) throws java.sql.SQLException
      Specified by:
      position in interface java.sql.Clob
      Throws:
      java.sql.SQLException
    • position

      public long position​(java.lang.String stringToFind, long startPos) throws java.sql.SQLException
      Specified by:
      position in interface java.sql.Clob
      Throws:
      java.sql.SQLException
    • setAsciiStream

      public java.io.OutputStream setAsciiStream​(long indexToWriteAt) throws java.sql.SQLException
      Specified by:
      setAsciiStream in interface java.sql.Clob
      Throws:
      java.sql.SQLException
    • setCharacterStream

      public java.io.Writer setCharacterStream​(long indexToWriteAt) throws java.sql.SQLException
      Specified by:
      setCharacterStream in interface java.sql.Clob
      Throws:
      java.sql.SQLException
    • setString

      public int setString​(long pos, java.lang.String str) throws java.sql.SQLException
      Specified by:
      setString in interface java.sql.Clob
      Throws:
      java.sql.SQLException
    • setString

      public int setString​(long pos, java.lang.String str, int offset, int len) throws java.sql.SQLException
      Specified by:
      setString in interface java.sql.Clob
      Throws:
      java.sql.SQLException
    • streamClosed

      public void streamClosed​(WatchableStream out)
      Description copied from interface: OutputStreamWatcher
      Called when the OutputStream being watched has .close() called
      Specified by:
      streamClosed in interface OutputStreamWatcher
      Parameters:
      out - WatchableStream
    • truncate

      public void truncate​(long length) throws java.sql.SQLException
      Specified by:
      truncate in interface java.sql.Clob
      Throws:
      java.sql.SQLException
    • writerClosed

      public void writerClosed​(char[] charDataBeingWritten)
    • writerClosed

      public void writerClosed​(WatchableWriter out)
      Description copied from interface: WriterWatcher
      Called when the Writer being watched has .close() called
      Specified by:
      writerClosed in interface WriterWatcher
      Parameters:
      out - WatchableWriter instance
    • free

      public void free() throws java.sql.SQLException
      Specified by:
      free in interface java.sql.Clob
      Throws:
      java.sql.SQLException
    • getCharacterStream

      public java.io.Reader getCharacterStream​(long pos, long length) throws java.sql.SQLException
      Specified by:
      getCharacterStream in interface java.sql.Clob
      Throws:
      java.sql.SQLException