public class ClobProxy extends Object implements InvocationHandler
Clobs for non-contextual creation, including proxy creation and
handling proxy invocations.| Modifier | Constructor and Description |
|---|---|
protected |
ClobProxy(Reader reader,
long length)
Constructor used to build
Clob from a reader. |
protected |
ClobProxy(String string)
Constructor used to build
Clob from string data. |
| Modifier and Type | Method and Description |
|---|---|
static Clob |
generateProxy(Reader reader,
long length)
Generates a
Clob proxy using a character reader of given length. |
static Clob |
generateProxy(String string)
Generates a
Clob proxy using the string data. |
protected InputStream |
getAsciiStream() |
protected Reader |
getCharacterStream() |
protected long |
getLength() |
protected static ClassLoader |
getProxyClassLoader()
Determines the appropriate class loader to which the generated proxy
should be scoped.
|
protected String |
getSubString(long start,
int length) |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
protected void |
resetIfNeeded() |
protected ClobProxy(String string)
Clob from string data.string - The byte arraygenerateProxy(String)protected ClobProxy(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 InputStream getAsciiStream() throws SQLException
SQLExceptionprotected Reader getCharacterStream() throws SQLException
SQLExceptionprotected String getSubString(long start, int length)
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerUnsupportedOperationException - if any methods other than Clob.length(),
Clob.getAsciiStream(), or Clob.getCharacterStream() are invoked.Throwableprotected void resetIfNeeded()
throws SQLException
SQLExceptionpublic static Clob generateProxy(String string)
Clob proxy using the string data.string - The data to be wrapped as a Clob.public static Clob generateProxy(Reader reader, long length)
Clob proxy using a character reader of given length.reader - The character readerlength - The length of the character readerprotected static ClassLoader getProxyClassLoader()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.