public class BinaryDataFile extends Object implements BinaryData
File.| Constructor and Description |
|---|
BinaryDataFile(int namespaceId,
int publicationId,
int binaryId,
File binaryFile)
Creates a new instance of this object.
|
BinaryDataFile(int namespaceId,
int publicationId,
int binaryId,
File binaryFile,
String variantId) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes()
Gets the binary data as an array of bytes.
|
long |
getDataSize()
Gets the size of underlying binary data.
|
int |
getId()
Gets the id of this binary data.
|
InputStream |
getInputStream()
Gets an
InputStream representing the binary data. |
int |
getNamespaceId()
Gets the namespace id.
|
int |
getPublicationId()
Gets the publication id of this binary data.
|
String |
getVariantId()
Returns the id of the variant for this binary data.
|
String |
toString()
Returns a string representation of this binary data file.
|
public BinaryDataFile(int namespaceId,
int publicationId,
int binaryId,
File binaryFile)
namespaceId - The namespace id.publicationId - The publication id.binaryId - The binary id.binaryFile - The File containing the binary data.public int getId()
getId in interface BinaryDatapublic int getNamespaceId()
BinaryDatagetNamespaceId in interface BinaryDatapublic int getPublicationId()
getPublicationId in interface BinaryDatapublic String getVariantId()
getVariantId in interface BinaryDatapublic InputStream getInputStream() throws IOException
InputStream representing the binary data.getInputStream in interface BinaryDataInputStream.IOException - If an error occurs accessing the binary data.public byte[] getBytes()
throws IOException
getBytes in interface BinaryDataIOException - If an error occurs accessing the binary data.public String toString()
public long getDataSize()
getDataSize in interface BinaryDataCopyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries