Package org.hibernate.engine.jdbc
Class BlobProxy
java.lang.Object
org.hibernate.engine.jdbc.BlobProxy
- All Implemented Interfaces:
InvocationHandler
Manages aspects of proxying
Blobs for non-contextual creation, including proxy creation and
handling proxy invocations.-
Method Summary
Modifier and TypeMethodDescriptionstatic BlobgenerateProxy(byte[] bytes) Generates a BlobImpl proxy using byte data.static BlobgenerateProxy(InputStream stream, long length) Generates a BlobImpl proxy using a given number of bytes from an InputStream.
-
Method Details
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
UnsupportedOperationException- if any methods other thanBlob.length()orBlob.getBinaryStream()are invoked.Throwable
-
generateProxy
Generates a BlobImpl proxy using byte data.- Parameters:
bytes- The data to be created as a Blob.- Returns:
- The generated proxy.
-
generateProxy
Generates a BlobImpl proxy using a given number of bytes from an InputStream.- Parameters:
stream- The input stream of bytes to be created as a Blob.length- The number of bytes from stream to be written to the Blob.- Returns:
- The generated proxy.
-