public class BinaryDataBuffer extends Object implements BinaryData
Constructor and Description |
---|
BinaryDataBuffer(int namespaceId,
int publicationId,
int binaryId,
byte[] binaryContent)
Creates a new instance of this object.
|
BinaryDataBuffer(int namespaceId,
int publicationId,
int binaryId,
byte[] binaryContent,
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.
|
public BinaryDataBuffer(int namespaceId, int publicationId, int binaryId, byte[] binaryContent)
namespaceId
- The namespace id.publicationId
- The publication id.binaryId
- The binary id.binaryContent
- The byte array containing the binary data.public BinaryDataBuffer(int namespaceId, int publicationId, int binaryId, byte[] binaryContent, String variantId)
public byte[] getBytes() throws IOException
getBytes
in interface BinaryData
IOException
- If an error occurs accessing the binary data.public int getId()
getId
in interface BinaryData
public String getVariantId()
getVariantId
in interface BinaryData
public InputStream getInputStream() throws IOException
InputStream
representing the binary data.getInputStream
in interface BinaryData
InputStream
.IOException
- If an error occurs accessing the binary data.public int getNamespaceId()
BinaryData
getNamespaceId
in interface BinaryData
public int getPublicationId()
BinaryData
getPublicationId
in interface BinaryData
public long getDataSize()
getDataSize
in interface BinaryData
Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries