类 ClobProxy
- java.lang.Object
-
- org.hibernate.engine.jdbc.ClobProxy
-
- 所有已实现的接口:
InvocationHandler
- 直接已知子类:
NClobProxy
public class ClobProxy extends Object implements InvocationHandler
Manages aspects of proxyingClobsfor non-contextual creation, including proxy creation and handling proxy invocations. We use proxies here solely to avoid JDBC version incompatibilities.- 作者:
- Gavin King, Steve Ebersole, Gail Badner
-
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static ClobgenerateProxy(Reader reader, long length)Generates aClobproxy using a character reader of given length.static ClobgenerateProxy(String string)Generates aClobproxy using the string data.protected InputStreamgetAsciiStream()protected ReadergetCharacterStream()protected longgetLength()protected static ClassLoadergetProxyClassLoader()Determines the appropriate class loader to which the generated proxy should be scoped.protected StringgetSubString(long start, int length)protected CharacterStreamgetUnderlyingStream()Objectinvoke(Object proxy, Method method, Object[] args)protected voidresetIfNeeded()
-
-
-
构造器详细资料
-
ClobProxy
protected ClobProxy(String string)
Constructor used to buildClobfrom string data.- 参数:
string- The byte array- 另请参阅:
generateProxy(String)
-
ClobProxy
protected ClobProxy(Reader reader, long length)
Constructor used to buildClobfrom a reader.- 参数:
reader- The character reader.length- The length of the reader stream.- 另请参阅:
generateProxy(java.io.Reader, long)
-
-
方法详细资料
-
getLength
protected long getLength()
-
getAsciiStream
protected InputStream getAsciiStream() throws SQLException
- 抛出:
SQLException
-
getCharacterStream
protected Reader getCharacterStream() throws SQLException
- 抛出:
SQLException
-
getUnderlyingStream
protected CharacterStream getUnderlyingStream() throws SQLException
- 抛出:
SQLException
-
getSubString
protected String getSubString(long start, int length)
-
invoke
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
- 指定者:
invoke在接口中InvocationHandler- 抛出:
UnsupportedOperationException- if any methods other thanClob.length(),Clob.getAsciiStream(),Clob.getCharacterStream(),ClobImplementer.getUnderlyingStream(),Clob.getSubString(long, int),Clob.free(), or toString/equals/hashCode are invoked.Throwable
-
resetIfNeeded
protected void resetIfNeeded() throws SQLException- 抛出:
SQLException
-
generateProxy
public static Clob generateProxy(String string)
Generates aClobproxy using the string data.- 参数:
string- The data to be wrapped as aClob.- 返回:
- The generated proxy.
-
generateProxy
public static Clob generateProxy(Reader reader, long length)
Generates aClobproxy using a character reader of given length.- 参数:
reader- The character readerlength- The length of the character reader- 返回:
- The generated proxy.
-
getProxyClassLoader
protected static ClassLoader getProxyClassLoader()
Determines the appropriate class loader to which the generated proxy should be scoped.- 返回:
- The class loader appropriate for proxy construction.
-
-