public interface

LobHelper

org.hibernate.LobHelper

Class Overview

A session's helper for creating LOB data

Summary

Public Methods
abstract Blob createBlob(InputStream stream, long length)
Create a new Blob from stream data.
abstract Blob createBlob(byte[] bytes)
Create a new Blob from bytes.
abstract Clob createClob(String string)
Create a new Clob from content
abstract Clob createClob(Reader reader, long length)
Create a new Clob from character reader.
abstract Clob createNClob(Reader reader, long length)
Create a new Clob from character reader.
abstract Clob createNClob(String string)
Create a new Clob from content.

Public Methods

public abstract Blob createBlob (InputStream stream, long length)

Create a new Blob from stream data.

Parameters
stream a binary stream
length the number of bytes in the stream
Returns
  • the create Blob

public abstract Blob createBlob (byte[] bytes)

Create a new Blob from bytes.

Parameters
bytes a byte array
Returns
  • the created Blob

public abstract Clob createClob (String string)

Create a new Clob from content

Parameters
string The string data
Returns

public abstract Clob createClob (Reader reader, long length)

Create a new Clob from character reader.

Parameters
reader a character stream
length the number of characters in the stream
Returns

public abstract Clob createNClob (Reader reader, long length)

Create a new Clob from character reader.

Note, on JDK 1.6+ environments will create and return a NClob instead (NClob extends the Clob interface).

Parameters
reader a character stream
length the number of characters in the stream
Returns
  • The created Clob/NClob

public abstract Clob createNClob (String string)

Create a new Clob from content.

Note, on JDK 1.6+ environments will create and return a NClob instead (NClob extends the Clob interface).

Parameters
string The string data
Returns
  • The created Clob/NClob