|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.engine.jdbc.ClobProxy
public class ClobProxy
Manages aspects of proxying Clobs
for non-contextual creation, including proxy creation and
handling proxy invocations. We use proxies here solely to avoid JDBC version incompatibilities.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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)
|
protected CharacterStream |
getUnderlyingStream()
|
Object |
invoke(Object proxy,
Method method,
Object[] args)
|
protected void |
resetIfNeeded()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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)
Method Detail |
---|
protected long getLength()
protected InputStream getAsciiStream() throws SQLException
SQLException
protected Reader getCharacterStream() throws SQLException
SQLException
protected CharacterStream getUnderlyingStream() throws SQLException
SQLException
protected String getSubString(long start, int length)
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
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.
Throwable
protected void resetIfNeeded() throws SQLException
SQLException
public 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 reader
protected static ClassLoader getProxyClassLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |