public class ClobProxy
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
Clobs
for non-contextual creation, including proxy creation and
handling proxy invocations. We use proxies here solely to avoid JDBC version incompatibilities.Modifier | Constructor and Description |
---|---|
protected |
ClobProxy(java.io.Reader reader,
long length)
Constructor used to build
Clob from a reader. |
protected |
ClobProxy(java.lang.String string)
Constructor used to build
Clob from string data. |
Modifier and Type | Method and Description |
---|---|
static java.sql.Clob |
generateProxy(java.io.Reader reader,
long length)
Generates a
Clob proxy using a character reader of given length. |
static java.sql.Clob |
generateProxy(java.lang.String string)
Generates a
Clob proxy using the string data. |
protected java.io.InputStream |
getAsciiStream() |
protected java.io.Reader |
getCharacterStream() |
protected long |
getLength() |
protected static java.lang.ClassLoader |
getProxyClassLoader()
Determines the appropriate class loader to which the generated proxy
should be scoped.
|
protected java.lang.String |
getSubString(long start,
int length) |
protected CharacterStream |
getUnderlyingStream() |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
protected void |
resetIfNeeded() |
protected ClobProxy(java.lang.String string)
Clob
from string data.string
- The byte arraygenerateProxy(String)
protected ClobProxy(java.io.Reader reader, long length)
Clob
from a reader.reader
- The character reader.length
- The length of the reader stream.generateProxy(java.io.Reader, long)
protected long getLength()
protected java.io.InputStream getAsciiStream() throws java.sql.SQLException
java.sql.SQLException
protected java.io.Reader getCharacterStream() throws java.sql.SQLException
java.sql.SQLException
protected CharacterStream getUnderlyingStream() throws java.sql.SQLException
java.sql.SQLException
protected java.lang.String getSubString(long start, int length)
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
java.lang.UnsupportedOperationException
- if any methods other than Clob.length()
,
Clob.getAsciiStream()
, Clob.getCharacterStream()
,
ClobImplementer.getUnderlyingStream()
, Clob.getSubString(long, int)
,
Clob.free()
, or toString/equals/hashCode are invoked.java.lang.Throwable
protected void resetIfNeeded() throws java.sql.SQLException
java.sql.SQLException
public static java.sql.Clob generateProxy(java.lang.String string)
Clob
proxy using the string data.string
- The data to be wrapped as a Clob
.public static java.sql.Clob generateProxy(java.io.Reader reader, long length)
Clob
proxy using a character reader of given length.reader
- The character readerlength
- The length of the character readerprotected static java.lang.ClassLoader getProxyClassLoader()
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.