public final class ContentBranding extends MetadataContainer
Modifier and Type | Field and Description |
---|---|
static Set<String> |
ALLOWED
Stores the allowed descriptor
keys.
|
static String |
KEY_BANNER_IMAGE
Descriptor key representing the banner image.
|
static String |
KEY_BANNER_TYPE
Descriptor key representing the banner image type.
Known/valid values are: 0: there is no image present 1: there is a BMP image 2: there is a JPEG image 3: there is a GIF image |
static String |
KEY_BANNER_URL
Descriptor key representing the banner image URL.
|
static String |
KEY_COPYRIGHT_URL
Descriptor key representing the copyright URL.
|
chunkLength, guid, position
Constructor and Description |
---|
ContentBranding()
Creates an instance.
|
ContentBranding(long pos,
BigInteger size)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getBannerImageURL()
Returns the banner image URL.
|
String |
getCopyRightURL()
Returns the copyright URL.
|
long |
getCurrentAsfChunkSize()
This method calculates the total amount of bytes, the chunk would consume
in an ASF file.
|
byte[] |
getImageData()
Returns the binary image data.
|
long |
getImageType()
Returns the image type.
|
boolean |
isAddSupported(MetadataDescriptor descriptor)
Determines/checks if the given descriptor may be added to the container.
This implies a check for the capabilities of the container specified by its container type. |
void |
setBannerImageURL(String imageURL)
This method sets the banner image URL, if
imageURL is not
blank. |
void |
setCopyRightURL(String copyRight)
This method sets the copyright URL, if
copyRight is not
blank. |
void |
setImage(long imageType,
byte[] imageData) |
long |
writeInto(OutputStream out)
Writes the chunk into the specified output stream, as ASF stream chunk.
|
addDescriptor, assertDescriptor, assertDescriptor, containsDescriptor, getContainerType, getDescriptorCount, getDescriptors, getDescriptorsByName, getValueFor, hasDescriptor, isEmpty, prettyPrint, removeDescriptorsByName, setStringValue
getChunckEnd, getChunkEnd, getChunkLength, getGuid, getPosition, setPosition, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGuid
public static final Set<String> ALLOWED
public static final String KEY_BANNER_IMAGE
public static final String KEY_BANNER_TYPE
public static final String KEY_BANNER_URL
public static final String KEY_COPYRIGHT_URL
public ContentBranding()
public ContentBranding(long pos, BigInteger size)
pos
- Position of content description within file or streamsize
- Length of content description.public String getBannerImageURL()
public String getCopyRightURL()
public long getCurrentAsfChunkSize()
getCurrentAsfChunkSize
in interface WriteableChunk
getCurrentAsfChunkSize
in class MetadataContainer
public byte[] getImageData()
public long getImageType()
for known/valid values.
public boolean isAddSupported(MetadataDescriptor descriptor)
isAddSupported
in class MetadataContainer
descriptor
- the descriptor to test.true
if MetadataContainer.addDescriptor(MetadataDescriptor)
can be called with given descriptor.public void setBannerImageURL(String imageURL)
imageURL
is not
blank.imageURL
- image URL to set.public void setCopyRightURL(String copyRight)
copyRight
is not
blank.copyRight
- copyright URL to set.public void setImage(long imageType, byte[] imageData)
imageType
- imageData
- public long writeInto(OutputStream out) throws IOException
writeInto
in interface WriteableChunk
writeInto
in class MetadataContainer
out
- stream to write into.IOException
- on I/O errorsCopyright © 2005–2020 jthink.net. All rights reserved.