public final class ContentDescription extends MetadataContainer
Modifier and Type | Field and Description |
---|---|
static Set<String> |
ALLOWED
Stores the only allowed keys of this metadata container.
|
static String |
KEY_AUTHOR
Field key for author.
|
static String |
KEY_COPYRIGHT
Field key for copyright.
|
static String |
KEY_DESCRIPTION
Field key for description.
|
static String |
KEY_RATING
Field key for rating.
|
static String |
KEY_TITLE
Field key for title.
|
chunkLength, guid, position
Constructor and Description |
---|
ContentDescription()
Creates an instance.
|
ContentDescription(long pos,
BigInteger chunkLen)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getAuthor() |
String |
getComment() |
String |
getCopyRight() |
long |
getCurrentAsfChunkSize()
This method calculates the total amount of bytes, the chunk would consume
in an ASF file.
|
String |
getRating() |
String |
getTitle() |
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. |
String |
prettyPrint(String prefix)
This method creates a String containing useful information prepared to be
printed on STD-OUT.
|
void |
setAuthor(String fileAuthor) |
void |
setComment(String tagComment) |
void |
setCopyright(String cpright) |
void |
setRating(String ratingText) |
void |
setTitle(String songTitle) |
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, 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_AUTHOR
public static final String KEY_COPYRIGHT
public static final String KEY_DESCRIPTION
public static final String KEY_RATING
public static final String KEY_TITLE
public ContentDescription()
public ContentDescription(long pos, BigInteger chunkLen)
pos
- Position of content description within file or streamchunkLen
- Length of content description.public String getAuthor()
public String getComment()
public String getCopyRight()
public long getCurrentAsfChunkSize()
getCurrentAsfChunkSize
in interface WriteableChunk
getCurrentAsfChunkSize
in class MetadataContainer
public String getRating()
public String getTitle()
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 String prettyPrint(String prefix)
prettyPrint
in class MetadataContainer
prefix
- each line gets this string prepended.public void setAuthor(String fileAuthor) throws IllegalArgumentException
fileAuthor
- The author to set.IllegalArgumentException
- If "UTF-16LE"-byte-representation would take more than 65535
bytes.public void setComment(String tagComment) throws IllegalArgumentException
tagComment
- The comment to set.IllegalArgumentException
- If "UTF-16LE"-byte-representation would take more than 65535
bytes.public void setCopyright(String cpright) throws IllegalArgumentException
cpright
- The copyRight to set.IllegalArgumentException
- If "UTF-16LE"-byte-representation would take more than 65535
bytes.public void setRating(String ratingText) throws IllegalArgumentException
ratingText
- The rating to be set.IllegalArgumentException
- If "UTF-16LE"-byte-representation would take more than 65535
bytes.public void setTitle(String songTitle) throws IllegalArgumentException
songTitle
- The title to set.IllegalArgumentException
- If "UTF-16LE"-byte-representation would take more than 65535
bytes.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.