public class BinaryStorageDao
extends java.lang.Object
implements java.io.Serializable
Modifier | Constructor and Description |
---|---|
protected |
BinaryStorageDao()
Default Constructor, used by JPA.
|
|
BinaryStorageDao(java.lang.String id,
byte[] data)
Conversion Constructor.
|
|
BinaryStorageDao(java.lang.String id,
java.io.InputStream input)
Conversion Constructor.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Get the bytes of the binary object.
|
java.io.ByteArrayInputStream |
getBytesAsStream()
Get the bytes of the binary object as an input stream.
|
java.lang.String |
getId()
Get the id.
|
protected BinaryStorageDao()
public BinaryStorageDao(java.lang.String id, byte[] data)
id
- the id of the binary datadata
- the binary datapublic BinaryStorageDao(java.lang.String id, java.io.InputStream input) throws java.io.IOException
id
- the id of the datainput
- InputStream of the binary datajava.io.IOException
- if any error occurspublic java.lang.String getId()
public byte[] getBytes()
public java.io.ByteArrayInputStream getBytesAsStream()