com.pivotal.gemfirexd.internal.client.am

## Class ClobLocatorWriter

- java.lang.Object
- - java.io.Writer
  - - com.pivotal.gemfirexd.internal.client.am.ClobLocatorWriter

All Implemented Interfaces:
  Closeable, Flushable, Appendable, AutoCloseable

    public class ClobLocatorWriter
    extends Writer

An `Writer` that will use an locator to write the Clob value into the server.

This `Writer` implementation is pretty basic. No buffering of data is done. Hence, for efficieny #write(char[]) should be used instead of #write(int).

### Field Summary

### Fields inherited from class java.io.Writer

`lock`

### Constructor Summary

Constructors
Constructor and Description
`ClobLocatorWriter(Connection connection, Clob clob, long pos)` Create a `Writer` for writing to the `Clob` value represented by the given locator based `Clob` object.

### Method Summary

Methods
`void` `close()`
`void` `flush()`
`void` `write(char[] c)`
`void` `write(char[] c, int off, int len)`
`void` `write(int c)`

### Methods inherited from class java.io.Writer

`append, append, append, write, write`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ClobLocatorWriter

    public ClobLocatorWriter(Connection connection,
                     Clob clob,
                     long pos)
                      throws SqlException

Create a `Writer` for writing to the `Clob` value represented by the given locator based `Clob` object.

Parameters:
  `connection` - connection to be used to write to the `Clob` value on the server
  `clob` - `Clob` object that contains locator for the `Clob` value on the server.
  `pos` - the position in the `CLOB` value at which to start writing; the first position is 1
Throws:
  `SqlException`

### Method Detail

#### close

    public void close()
               throws IOException

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in class `Writer`
Throws:
  `IOException`
See Also:
  `Writer.close()`

#### write

    public void write(int c)
               throws IOException

Overrides:
  `write` in class `Writer`
Throws:
  `IOException`
See Also:
  `This method writes one Character at a time to the server. For more efficient writing, use #write(char[]).`

#### write

    public void write(char[] c)
               throws IOException

Overrides:
  `write` in class `Writer`
Throws:
  `IOException`
See Also:
  `Writer.write(char[])`

#### flush

    public void flush()

Specified by:
  `flush` in interface `Flushable`
Specified by:
  `flush` in class `Writer`
See Also:
  `Writer.flush()`

#### write

    public void write(char[] c,
             int off,
             int len)
               throws IOException

Specified by:
  `write` in class `Writer`
Throws:
  `IOException`
See Also:
  `Writer.write(char[], int, int)`