java.lang.AutoCloseable
public interface SqlClob
extends java.lang.AutoCloseable
Modifier and Type | Method | Description |
---|---|---|
default void |
close() |
|
Operation<java.lang.Void> |
closeOperation() |
|
default java.util.concurrent.CompletionStage<java.lang.Long> |
getPosition() |
Get the position of this
SqlClob . |
Operation<java.lang.Long> |
getPositionOperation() |
|
java.io.Reader |
getReader() |
Returns a
Reader for the characters in this SqlClob . |
java.io.Writer |
getWriter() |
Returns a Writer for this
SqlClob . |
default java.util.concurrent.CompletionStage<java.lang.Long> |
length() |
Get the length of this
SqlClob . |
Operation<java.lang.Long> |
lengthOperation() |
|
default SqlClob |
locate(java.lang.CharSequence target) |
Set the position to the beginning of the next occurrence of the target
after the position.
|
default SqlClob |
locate(SqlClob target) |
Set the position to the beginning of the next occurrence of the target
after the position.
|
Operation<java.lang.Long> |
locateOperation(java.lang.CharSequence target) |
Return an
Operation to set the position to the beginning of the
next occurrence of the target after the position. |
Operation<java.lang.Long> |
locateOperation(SqlClob target) |
Return an
Operation to set the position to the beginning of the
next occurrence of the target after the position. |
default SqlClob |
setPosition(long offset) |
Set the position of this
SqlClob . |
Operation<java.lang.Long> |
setPositionOperation(long offset) |
|
default SqlClob |
trim() |
|
Operation<java.lang.Long> |
trimOperation() |
Operation<java.lang.Void> closeOperation()
default void close()
close
in interface java.lang.AutoCloseable
Operation<java.lang.Long> getPositionOperation()
Operation
that fetches the position of this SqlClob
.
Position 0 is immediately before the first char in the SqlClob
.
Position 1 is the first char in the SqlClob
, etc. Position
length()
is the last char in the SqlClob
.
Position is between 0 and length + 1.Operation
that returns the position of this SqlClob
java.lang.IllegalStateException
- if the Connection
that created this
SqlClob
is closed.;default java.util.concurrent.CompletionStage<java.lang.Long> getPosition()
SqlClob
. Position 0 is immediately before the
first char in the SqlClob
. Position 1 is the first char in the
SqlClob
, etc. Position length()
is the last char in the SqlClob.
Position is between 0 and length + 1.
ISSUE: Should position be 1-based as SQL seems to do or 0-based as Java
does?SqlClob
java.lang.IllegalStateException
- if the Connection
that created this
SqlClob
is closed.Operation<java.lang.Long> lengthOperation()
Operation
that returns the length of this SqlClob
java.lang.IllegalStateException
- if the Connection
that created this
SqlClob
is closed.default java.util.concurrent.CompletionStage<java.lang.Long> length()
SqlClob
.Future
which value is the number of
chars in this SqlClob
java.lang.IllegalStateException
- if the Connection
that created this
SqlClob
is closed.Operation<java.lang.Long> setPositionOperation(long offset)
Operation
that sets the position of this SqlClob
. If
offset
exceeds the length of this SqlClob
set position to the
length + 1 of this SqlClob
, ie one past the last char.offset
- a non-negative numberOperation
that sets the position of this SqlClob
java.lang.IllegalArgumentException
- if offset
is less than 0java.lang.IllegalStateException
- if the Connection
that created this
SqlClob
is closed.default SqlClob setPosition(long offset)
SqlClob
. If offset
exceeds the length
of this SqlClob
set position to the length + 1 of this SqlClob
,
ie one past the last char.offset
- the 1-based position to setSqlClob
java.lang.IllegalArgumentException
- if offset
is less than 0java.lang.IllegalStateException
- if the Connection
that created this
SqlClob
is closed.Operation<java.lang.Long> locateOperation(SqlClob target)
Operation
to set the position to the beginning of the
next occurrence of the target after the position. If there is no such
occurrence set the position to 0.target
- a SqlClob
created by the same Connection
containing the char sequence to search forOperation
that locates target
in this
SqlClob
java.lang.IllegalArgumentException
- if target
was created by some
other Connection
java.lang.IllegalStateException
- if the Connection
that created this
SqlClob
is closed.default SqlClob locate(SqlClob target)
target
- the char sequence to search forSqlClob
java.lang.IllegalArgumentException
- if target
was created by some
other Connection
java.lang.IllegalStateException
- if the Connection
that created this
SqlClob
is closedOperation<java.lang.Long> locateOperation(java.lang.CharSequence target)
Operation
to set the position to the beginning of the
next occurrence of the target after the position. If there is no such
occurrence set the position to 0.target
- the char sequence to search for. Not null
. Captured.Operation
that locates target
in this
SqlClob
java.lang.IllegalStateException
- if the Connection
that created this
SqlClob
is closed.default SqlClob locate(java.lang.CharSequence target)
target
- the char sequence to search forSqlClob
java.lang.IllegalStateException
- if the Connection
that created this
SqlClob
is closed.Operation<java.lang.Long> trimOperation()
Operation
that truncates this SqlClob
so that the
current position is the end of the SqlClob
. If the position is N, then
after trim() the length is N - 1. The position is still N. This will fail
if position is 0.Operation
that trims the length of this SqlClob
java.lang.IllegalStateException
- if the Connection
that created this
SqlClob
is closed or position is 0.default SqlClob trim()
SqlClob
so that the current position is the end of the
SqlClob
. If the position is N, then after trim()
the length is
N - 1. The position is still N. This will fail if position is 0.SqlClob
java.lang.IllegalStateException
- if the Connection
that created this
SqlClob
is closed or position is 0.java.io.Reader getReader()
Reader
for the characters in this SqlClob
.
Characters are read starting at the current position. Each character read
advances the position by one.
ISSUE: There is no character analog to
AsynchronousByteChannel
. It is trivial to
construct a Reader
from an
AsynchronousByteChannel
however.java.io.Writer getWriter()
SqlClob
. Characters are written starting at
the current position. Each character written advances the position by one.
ISSUE: There is no character analog to
AsynchronousByteChannel
. It is trivial to
construct a Writer
from an
AsynchronousByteChannel
however.Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2017, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.
DRAFT JDBC 4.4 EA