Package ddf.catalog.data.impl
Class BinaryContentImpl
java.lang.Object
ddf.catalog.data.impl.BinaryContentImpl
- All Implemented Interfaces:
ddf.catalog.data.BinaryContent
- Direct Known Subclasses:
ResourceImpl
This class is a common implementation of the
BinaryContent interface.-
Constructor Summary
ConstructorsConstructorDescriptionBinaryContentImpl(InputStream inputStream) Instantiates a new product resource.BinaryContentImpl(InputStream inputStream, javax.activation.MimeType mimeType) Instantiates a new product resource. -
Method Summary
-
Constructor Details
-
BinaryContentImpl
Instantiates a new product resource.- Parameters:
inputStream- the input streammimeType- the mime type for the resource
-
BinaryContentImpl
Instantiates a new product resource.- Parameters:
inputStream- the input stream
-
-
Method Details
-
getInputStream
- Specified by:
getInputStreamin interfaceddf.catalog.data.BinaryContent
-
getMimeType
public javax.activation.MimeType getMimeType()- Specified by:
getMimeTypein interfaceddf.catalog.data.BinaryContent
-
getMimeTypeValue
- Specified by:
getMimeTypeValuein interfaceddf.catalog.data.BinaryContent
-
toString
String representation of thisBinaryContentImpl. -
getSize
public long getSize()- Specified by:
getSizein interfaceddf.catalog.data.BinaryContent
-
setSize
public void setSize(long size) Sets the size in bytes of the binary content. If the size is unknown, then a -1 is returned.- Parameters:
size-
-
getByteArray
- Specified by:
getByteArrayin interfaceddf.catalog.data.BinaryContent- Throws:
IOException
-