Package com.mysql.cj.jdbc
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 voidfree()java.io.InputStreamgetAsciiStream()java.io.ReadergetCharacterStream()java.io.ReadergetCharacterStream(long pos, long length)java.lang.StringgetSubString(long startPos, int length)longlength()longposition(java.lang.String stringToFind, long startPos)longposition(java.sql.Clob arg0, long arg1)java.io.OutputStreamsetAsciiStream(long indexToWriteAt)java.io.WritersetCharacterStream(long indexToWriteAt)intsetString(long pos, java.lang.String str)intsetString(long pos, java.lang.String str, int offset, int len)voidstreamClosed(WatchableStream out)Called when the OutputStream being watched has .close() calledvoidtruncate(long length)voidwriterClosed(char[] charDataBeingWritten)voidwriterClosed(WatchableWriter out)Called when the Writer being watched has .close() called
-
Constructor Details
-
Method Details
-
getAsciiStream
public java.io.InputStream getAsciiStream() throws java.sql.SQLException- Specified by:
getAsciiStreamin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
getCharacterStream
public java.io.Reader getCharacterStream() throws java.sql.SQLException- Specified by:
getCharacterStreamin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
getSubString
public java.lang.String getSubString(long startPos, int length) throws java.sql.SQLException- Specified by:
getSubStringin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
length
public long length() throws java.sql.SQLException- Specified by:
lengthin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
position
public long position(java.sql.Clob arg0, long arg1) throws java.sql.SQLException- Specified by:
positionin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
position
public long position(java.lang.String stringToFind, long startPos) throws java.sql.SQLException- Specified by:
positionin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
setAsciiStream
public java.io.OutputStream setAsciiStream(long indexToWriteAt) throws java.sql.SQLException- Specified by:
setAsciiStreamin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
setCharacterStream
public java.io.Writer setCharacterStream(long indexToWriteAt) throws java.sql.SQLException- Specified by:
setCharacterStreamin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
setString
public int setString(long pos, java.lang.String str) throws java.sql.SQLException- Specified by:
setStringin interfacejava.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:
setStringin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
streamClosed
Description copied from interface:OutputStreamWatcherCalled when the OutputStream being watched has .close() called- Specified by:
streamClosedin interfaceOutputStreamWatcher- Parameters:
out-WatchableStream
-
truncate
public void truncate(long length) throws java.sql.SQLException- Specified by:
truncatein interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
writerClosed
public void writerClosed(char[] charDataBeingWritten) -
writerClosed
Description copied from interface:WriterWatcherCalled when the Writer being watched has .close() called- Specified by:
writerClosedin interfaceWriterWatcher- Parameters:
out- WatchableWriter instance
-
free
public void free() throws java.sql.SQLException- Specified by:
freein interfacejava.sql.Clob- Throws:
java.sql.SQLException
-
getCharacterStream
public java.io.Reader getCharacterStream(long pos, long length) throws java.sql.SQLException- Specified by:
getCharacterStreamin interfacejava.sql.Clob- Throws:
java.sql.SQLException
-