public class

BlobProxy

extends Object
implements InvocationHandler
java.lang.Object
   ↳ org.hibernate.engine.jdbc.BlobProxy

Class Overview

Manages aspects of proxying Blob Blobs for non-contextual creation, including proxy creation and handling proxy invocations.

Summary

Public Methods
static Blob generateProxy(InputStream stream, long length)
Generates a BlobImpl proxy using a given number of bytes from an InputStream.
static Blob generateProxy(byte[] bytes)
Generates a BlobImpl proxy using byte data.
Object invoke(Object proxy, Method method, Object[] args)
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.reflect.InvocationHandler

Public Methods

public static Blob generateProxy (InputStream stream, long length)

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.

public static Blob generateProxy (byte[] bytes)

Generates a BlobImpl proxy using byte data.

Parameters
bytes The data to be created as a Blob.
Returns
  • The generated proxy.

public Object invoke (Object proxy, Method method, Object[] args)

Throws
UnsupportedOperationException if any methods other than length() or getBinaryStream() are invoked.
Throwable