public class LOBStoredProcedure
extends java.lang.Object
Constructor and Description |
---|
LOBStoredProcedure() |
Modifier and Type | Method and Description |
---|---|
static int |
BLOBCREATELOCATOR()
Creates a new empty Blob and registers it in the HashMap in the
Connection and returns the locator value corresponding to this Blob.
|
static byte[] |
BLOBGETBYTES(int LOCATOR,
long pos,
int len)
Reads up to len bytes from the associated
Blob and returns a
byte array containing the bytes read. |
static long |
BLOBGETLENGTH(int LOCATOR)
Returns the length in bytes of the Blob.
|
static long |
BLOBGETPOSITIONFROMBYTES(int LOCATOR,
byte[] searchBytes,
long pos)
Returns the first occurrence of the byte array in the Blob.
|
static long |
BLOBGETPOSITIONFROMLOCATOR(int LOCATOR,
int searchLocator,
long pos)
Returns the first occurrence of locator in the Blob.
|
static void |
BLOBRELEASELOCATOR(int LOCATOR)
Removes the supplied LOCATOR entry from the hash map.
|
static void |
BLOBSETBYTES(int LOCATOR,
long pos,
int len,
byte[] replaceBytes)
Replaces the bytes at pos with len bytes
|
static void |
BLOBTRUNCATE(int LOCATOR,
long length)
truncates the Blob value represented by LOCATOR to have a length
of length.
|
static int |
CLOBCREATELOCATOR()
Creates a new empty Clob and registers it in the HashMap in the
Connection and returns the locator value corresponding to this Clob.
|
static long |
CLOBGETLENGTH(int LOCATOR)
returns the length of the Clob corresponding to the LOCATOR value.
|
static long |
CLOBGETPOSITIONFROMLOCATOR(int LOCATOR,
int searchLocator,
long fromPosition)
returns the first occurrence of the given search string from the
given start search position inside the Clob.
|
static long |
CLOBGETPOSITIONFROMSTRING(int LOCATOR,
java.lang.String searchLiteral,
long fromPosition)
returns the first occurrence of the given search string from the
given start search position inside the Clob.
|
static java.lang.String |
CLOBGETSUBSTRING(int LOCATOR,
long pos,
int len)
Returns the
String starting from pos and consisting of
up to len consecutive characters from the Clob
corresponding to LOCATOR . |
static void |
CLOBRELEASELOCATOR(int LOCATOR)
Removes the supplied LOCATOR entry from the hash map.
|
static void |
CLOBSETSTRING(int LOCATOR,
long pos,
int length,
java.lang.String str)
replaces the characters starting at fromPosition and with length ForLength
|
static void |
CLOBTRUNCATE(int LOCATOR,
long length)
truncates the Clob value represented by LOCATOR to have a length
of length.
|
public static int CLOBCREATELOCATOR() throws java.sql.SQLException
java.sql.SQLException
public static void CLOBRELEASELOCATOR(int LOCATOR) throws java.sql.SQLException
LOCATOR
- an integer that represents the locator that needs to be
removed from the hash map.java.sql.SQLException
public static long CLOBGETPOSITIONFROMSTRING(int LOCATOR, java.lang.String searchLiteral, long fromPosition) throws java.sql.SQLException
LOCATOR
- an integer that represents the locator of the Clob
in which the given position of the given sub-string
needs to be found.searchLiteral
- a String whose occurence inside the Clob needs to
be found starting from pos.fromPosition
- an integer that represents the position inside
the Clob from which the search needs to begin.java.sql.SQLException
public static long CLOBGETPOSITIONFROMLOCATOR(int LOCATOR, int searchLocator, long fromPosition) throws java.sql.SQLException
LOCATOR
- an integer that represents the locator of the Clob
in which the given position of the given sub-string
needs to be found.searchLocator
- a Locator representing a Clob whose occurence inside
the Clob needs to be found starting from pos.fromPosition
- an integer that represents the position inside
the Clob from which the search needs to begin.java.sql.SQLException
public static long CLOBGETLENGTH(int LOCATOR) throws java.sql.SQLException
LOCATOR
- an integer that represents the locator of the Clob whose
length needs to be obtained.java.sql.SQLException
public static java.lang.String CLOBGETSUBSTRING(int LOCATOR, long pos, int len) throws java.sql.SQLException
String
starting from pos
and consisting of
up to len
consecutive characters from the Clob
corresponding to LOCATOR
.LOCATOR
- an integer that represents the LOCATOR used
to retrieve an instance of the LOB.pos
- a long that represents the position from which
the substring begins.len
- an integer representing the maximum length of the substring.
The value will be reduced to the maximum allowed return length if
required (see Limits.MAX_CLOB_RETURN_LEN
).Clob
starting at the given position,
not longer than len
characters.java.sql.SQLException
public static void CLOBSETSTRING(int LOCATOR, long pos, int length, java.lang.String str) throws java.sql.SQLException
LOCATOR
- an integer that represents the locator of the Clob in which
the characters need to be replaced.pos
- an integer that represents the position inside the Clob from which
the string needs to be replaced.length
- the number of characters from the string that need to be used for
replacement.str
- the string from which the repalcement characters are built.java.sql.SQLException
public static void CLOBTRUNCATE(int LOCATOR, long length) throws java.sql.SQLException
LOCATOR
- an integer that represents the LOCATOR used to retrieve an
instance of the LOB.length
- an integer that represents the length to which the Clob
must be truncated to.java.sql.SQLException
public static int BLOBCREATELOCATOR() throws java.sql.SQLException
java.sql.SQLException
public static void BLOBRELEASELOCATOR(int LOCATOR) throws java.sql.SQLException
LOCATOR
- an integer that represents the locator that needs to be
removed from the hash map.java.sql.SQLException
public static long BLOBGETPOSITIONFROMLOCATOR(int LOCATOR, int searchLocator, long pos) throws java.sql.SQLException
LOCATOR
- the locator value of the Blob in which the seaching needs
to be done.searchLocator
- the locator value of the Blob whose position needs
needs to be found.pos
- the position from which the seaching needs to be done.java.sql.SQLException
public static long BLOBGETPOSITIONFROMBYTES(int LOCATOR, byte[] searchBytes, long pos) throws java.sql.SQLException
LOCATOR
- the locator value of the Blob in which the seaching needs
to be done.searchBytes
- the byte array whose position needs needs to be found.pos
- the position from which the seaching needs to be done.java.sql.SQLException
public static long BLOBGETLENGTH(int LOCATOR) throws java.sql.SQLException
LOCATOR
- the locator value of the Blob whose length needs to
be found.java.sql.SQLException
public static byte[] BLOBGETBYTES(int LOCATOR, long pos, int len) throws java.sql.SQLException
Blob
and returns a
byte array containing the bytes read.
Note that a smaller number of bytes than requested might be returned. The number of bytes returned can be found by checking the length of the returned byte array.
LOCATOR
- the locator value of the Blob from which the byte array
needs to be retrieved.len
- the maximum number of bytes to read. The value will be
reduced to the maximum allowed return length if required
(see Limits.MAX_BLOB_RETURN_LEN
).pos
- the position from which the bytes from the Blob need to be
retrieved.pos
in the Blob
.java.sql.SQLException
public static void BLOBSETBYTES(int LOCATOR, long pos, int len, byte[] replaceBytes) throws java.sql.SQLException
LOCATOR
- the integer that represents the Blob in which the bytes
need to be replaced.pos
- the position stating from which the byte replacement needs to
happen.len
- the number of bytes that need to be used in replacement.replaceBytes
- the byte array that contains the bytes that needs to
be used for replacement.java.sql.SQLException
public static void BLOBTRUNCATE(int LOCATOR, long length) throws java.sql.SQLException
LOCATOR
- an integer that represents the LOCATOR used to retrieve an
instance of the LOB.length
- an integer that represents the length to which the Blob
must be truncated to.java.sql.SQLException