public class BinaryFieldData
extends java.lang.Object
implements de.innovationgate.wga.common.ImmutableObject
WGDocument.getExtensionData(String)
when the data on the extension data field is binary.Modifier and Type | Class and Description |
---|---|
static interface |
BinaryFieldData.Retriever
An interface for the functionality that actually retrieves the input stream of binary field data
|
class |
BinaryFieldData.SizeReportingInputStream |
Constructor and Description |
---|
BinaryFieldData(long size,
BinaryFieldData.Retriever retriever)
Constructor for binary field datas from database.
|
BinaryFieldData(java.lang.Object binaryValue)
Constructor to create an new binary field.
|
Modifier and Type | Method and Description |
---|---|
static java.io.InputStream |
getBinaryDataInputStream(java.lang.Object value)
Returns an input stream for all binary data object types that this object accepts as input
|
java.io.InputStream |
getInputStream()
Returns the binary data as input stream
|
long |
getSize()
Returns the size of the binary data in bytes.
|
static boolean |
isBinaryValue(java.lang.Object value)
Returns if a field value is "binary", i.e. can be used as input for this object
|
public BinaryFieldData(long size, BinaryFieldData.Retriever retriever)
size
- retriever
- public BinaryFieldData(java.lang.Object binaryValue) throws java.io.IOException
binaryValue
- The binary value. Either an InputStream
, byte array, File
, DataSource
or another BinaryFieldData
objectjava.io.IOException
public static boolean isBinaryValue(java.lang.Object value)
public long getSize()
public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
public static java.io.InputStream getBinaryDataInputStream(java.lang.Object value) throws java.io.IOException
value
- The binary value. Accepts the same types as BinaryFieldData(Object)
constructor.java.io.IOException