## org.mariadb.jdbc
Class MariaDbClob

    java.lang.Object
      org.mariadb.jdbc.MariaDbBlob
          org.mariadb.jdbc.MariaDbClob

All Implemented Interfaces:
  Serializable, Blob, Clob, NClob

    public class MariaDbClob

extends MariaDbBlob
implements Clob, NClob, Serializable

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.mariadb.jdbc.MariaDbBlob
`actualSize, blobContent`

Constructor Summary
`MariaDbClob()`
`MariaDbClob(byte[] bytes)`

Method Summary
`InputStream` `getAsciiStream()`
`Reader` `getCharacterStream()`
`Reader` `getCharacterStream(long pos, long length)`
`String` `getSubString(long pos, int length)` Get sub string.
`long` `length()` Return character length of the Clob.
`long` `position(Clob searchstr, long start)`
`long` `position(String searchstr, long start)`
`OutputStream` `setAsciiStream(long pos)`
`Writer` `setCharacterStream(long pos)` Set character stream.
`int` `setString(long pos, String str)` Set String.
`int` `setString(long pos, String str, int offset, int len)`
`String` `toString()` ToString implementation.

Methods inherited from class org.mariadb.jdbc.MariaDbBlob
`free, getBinaryStream, getBinaryStream, getBytes, position, position, setBinaryStream, setBytes, setBytes, truncate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.sql.Clob
`free, truncate`

Constructor Detail

### MariaDbClob

    public MariaDbClob(byte[] bytes)

### MariaDbClob

    public MariaDbClob()

Method Detail

### toString

    public String toString()

  ToString implementation.

  Overrides:
    `toString` in class `Object`
  Returns:
    string value of blob content.

### getSubString

    public String getSubString(long pos,
                               int length)
                        throws SQLException

  Get sub string.

  Specified by:
    `getSubString` in interface `Clob`
  Parameters:
    `pos` - position
    `length` - length of sub string
  Returns:
    substring
  Throws:
    `SQLException` - if position is not possible

### getCharacterStream

    public Reader getCharacterStream()
                              throws SQLException

  Specified by:
    `getCharacterStream` in interface `Clob`
  Throws:
    `SQLException`

### getCharacterStream

    public Reader getCharacterStream(long pos,
                                     long length)
                              throws SQLException

  Specified by:
    `getCharacterStream` in interface `Clob`
  Throws:
    `SQLException`

### setCharacterStream

    public Writer setCharacterStream(long pos)
                              throws SQLException

  Set character stream.

  Specified by:
    `setCharacterStream` in interface `Clob`
  Parameters:
    `pos` - position
  Returns:
    writer
  Throws:
    `SQLException` - if position is invalid

### getAsciiStream

    public InputStream getAsciiStream()
                               throws SQLException

  Specified by:
    `getAsciiStream` in interface `Clob`
  Throws:
    `SQLException`

### position

    public long position(String searchstr,
                         long start)
                  throws SQLException

  Specified by:
    `position` in interface `Clob`
  Throws:
    `SQLException`

### position

    public long position(Clob searchstr,
                         long start)
                  throws SQLException

  Specified by:
    `position` in interface `Clob`
  Throws:
    `SQLException`

### setString

    public int setString(long pos,
                         String str)
                  throws SQLException

  Set String.

  Specified by:
    `setString` in interface `Clob`
  Parameters:
    `pos` - position
    `str` - string
  Returns:
    string length
  Throws:
    `SQLException` - if UTF-8 convertion failed

### setString

    public int setString(long pos,
                         String str,
                         int offset,
                         int len)
                  throws SQLException

  Specified by:
    `setString` in interface `Clob`
  Throws:
    `SQLException`

### setAsciiStream

    public OutputStream setAsciiStream(long pos)
                                throws SQLException

  Specified by:
    `setAsciiStream` in interface `Clob`
  Throws:
    `SQLException`

### length

    public long length()

  Return character length of the Clob. Assume UTF8 encoding.

  Specified by:
    `length` in interface `Blob`
  Specified by:
    `length` in interface `Clob`
  Overrides:
    `length` in class `MariaDbBlob`
  Returns:
    length of the `BLOB` in bytes

Copyright © 2017. All rights reserved.