|
||||||||||
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(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(String text)
Constructor for LobData from a string. |
|
DBBlobData(String text,
String encoding)
Constructor for LobData from a string. |
Method Summary | |
---|---|
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(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(InputStream inputStream, int length) throws IllegalArgumentException
inputStream
- The stream where the data will be read fromlength
- The number of bytes to read from the stream
IllegalArgumentException
- If the inputStream is nullpublic DBBlobData(byte[] data) throws IllegalArgumentException
data
- The byte array
IllegalArgumentException
- If the text is null or the encoding is unsupportedString.getBytes(java.lang.String)
public DBBlobData(String text, String encoding) throws 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.
IllegalArgumentException
- If the text is null or the encoding is unsupportedString.getBytes(java.lang.String)
public DBBlobData(String text) throws IllegalArgumentException
text
- The string to be used as data. The encoding is set using setDefaultEncoding
IllegalArgumentException
- If the text is null or the encoding is unsupportedString.getBytes(java.lang.String)
Method Detail |
---|
public InputStream getInputStream()
public int getLength()
public static void setDefaultEncoding(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 |