oracle.forms.jdapi
Class Blob

java.lang.Object
  |
  +--oracle.forms.jdapi.Blob

public class Blob
extends java.lang.Object

Blob utility class. The purpose of this class is to provide additional Blob support for methods such as setPersistentClientInfo, getPersistentClientInfoObject, and getPersistentClientInfoBlob which set and get client information as Blobs.


Constructor Summary
Blob()
          No args constructor.
Blob(byte[] byteArray)
          Constructs a Blob object and initializes it to the specified byte[].
Blob(java.lang.String stringValue)
          Constructs a Blob object and initializes it with the bytearray got from the specified string.
 
Method Summary
 boolean equals(Blob blob)
          Compares two Blob objects and determines whether they are equal.
 byte[] getBytes()
          Converts this Blob into bytes and stores it as a byte array.
 void setBytes(byte[] b)
          Converts a byte array into a Blob.
 int size()
          Returns the current size of the buffer.
 java.lang.String toString()
          Returns the buffer as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Blob

public Blob()
No args constructor.

Blob

public Blob(java.lang.String stringValue)
     throws JdapiException
Constructs a Blob object and initializes it with the bytearray got from the specified string. While converting the string to a bytearray the platform's default character encoding is used.
Parameters:
stringValue - string to initialize the Blob.

Blob

public Blob(byte[] byteArray)
     throws JdapiException
Constructs a Blob object and initializes it to the specified byte[].
Method Detail

getBytes

public byte[] getBytes()
Converts this Blob into bytes and stores it as a byte array.
Returns:
a byte array.

setBytes

public void setBytes(byte[] b)
              throws JdapiException
Converts a byte array into a Blob.

size

public int size()
Returns the current size of the buffer.
Returns:
the count of the buffer field, which is the number of valid bytes in this output stream.

toString

public java.lang.String toString()
Returns the buffer as a string.
Overrides:
toString in class java.lang.Object
Returns:
the String version of the contents of the buffer.

equals

public boolean equals(Blob blob)
Compares two Blob objects and determines whether they are equal.
Parameters:
Blob - blob to be compared.
Returns:
true if the two objects are equal; false otherwise.