|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.empire.db.DBBlobData
public class DBBlobData
This class allocates methods to store binary large objects in the database.
Constructor Summary | |
---|---|
DBBlobData(byte[] data)
Constructor for LobData from a byte array. |
|
DBBlobData(java.io.InputStream inputStream,
int length)
Constructor to pass LOB data to the setValue methods of a record, consisting of the input stream where the data can be loaded from and the length of the data. |
|
DBBlobData(java.lang.String text)
Constructor for LobData from a string. |
|
DBBlobData(java.lang.String text,
java.lang.String encoding)
Constructor for LobData from a string. |
Method Summary | |
---|---|
java.io.InputStream |
getInputStream()
Returns the inputStream with the binary data for the BLOB. |
int |
getLength()
Returns the length of the BLOB data in bytes. |
static void |
setDefaultEncoding(java.lang.String defaultEncoding)
Sets the defaultEncoding used in a constructor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBBlobData(java.io.InputStream inputStream, int length) throws java.lang.IllegalArgumentException
inputStream
- The stream where the data will be read fromlength
- The number of bytes to read from the stream
java.lang.IllegalArgumentException
- If the inputStream is nullpublic DBBlobData(byte[] data) throws java.lang.IllegalArgumentException
data
- The byte array
java.lang.IllegalArgumentException
- If the text is null or the encoding is unsupportedString.getBytes(java.lang.String)
public DBBlobData(java.lang.String text, java.lang.String encoding) throws java.lang.IllegalArgumentException
text
- The string to be used as dataencoding
- The encoding of the string. The string must be converted to a byte array to put in the BLOB. It is
necessary to convert the string.
java.lang.IllegalArgumentException
- If the text is null or the encoding is unsupportedString.getBytes(java.lang.String)
public DBBlobData(java.lang.String text) throws java.lang.IllegalArgumentException
text
- The string to be used as data. The encoding is set using setDefaultEncoding
java.lang.IllegalArgumentException
- If the text is null or the encoding is unsupportedString.getBytes(java.lang.String)
Method Detail |
---|
public java.io.InputStream getInputStream()
public int getLength()
public static void setDefaultEncoding(java.lang.String defaultEncoding)
defaultEncoding
- Set the defaultEncoding used in a constructorDBBlobData(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |