|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jaudiotagger.audio.asf.data.Chunk org.jaudiotagger.audio.asf.data.MetadataContainer org.jaudiotagger.audio.asf.data.ContentDescription
public final class ContentDescription
This class represents the data of a chunk which contains title, author,
copyright, description and the rating of the file.
It is optional within ASF files. But if, exists only once.
Field Summary | |
---|---|
static java.util.Set<java.lang.String> |
ALLOWED
Stores the only allowed keys of this metadata container. |
static java.lang.String |
KEY_AUTHOR
Field key for author. |
static java.lang.String |
KEY_COPYRIGHT
Field key for copyright. |
static java.lang.String |
KEY_DESCRIPTION
Field key for description. |
static java.lang.String |
KEY_RATING
Field key for rating. |
static java.lang.String |
KEY_TITLE
Field key for title. |
Fields inherited from class org.jaudiotagger.audio.asf.data.Chunk |
---|
chunkLength, guid, position |
Constructor Summary | |
---|---|
ContentDescription()
Creates an instance. |
|
ContentDescription(long pos,
java.math.BigInteger chunkLen)
Creates an instance. |
Method Summary | |
---|---|
java.lang.String |
getAuthor()
|
java.lang.String |
getComment()
|
java.lang.String |
getCopyRight()
|
long |
getCurrentAsfChunkSize()
This method calculates the total amount of bytes, the chunk would consume in an ASF file. |
java.lang.String |
getRating()
|
java.lang.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. |
java.lang.String |
prettyPrint(java.lang.String prefix)
This method creates a String containing useful information prepared to be printed on STD-OUT. |
void |
setAuthor(java.lang.String fileAuthor)
|
void |
setComment(java.lang.String tagComment)
|
void |
setCopyright(java.lang.String cpright)
|
void |
setRating(java.lang.String ratingText)
|
void |
setTitle(java.lang.String songTitle)
|
long |
writeInto(java.io.OutputStream out)
Writes the chunk into the specified output stream, as ASF stream chunk. |
Methods inherited from class org.jaudiotagger.audio.asf.data.MetadataContainer |
---|
addDescriptor, assertDescriptor, assertDescriptor, containsDescriptor, getContainerType, getDescriptorCount, getDescriptors, getDescriptorsByName, getValueFor, hasDescriptor, isEmpty, removeDescriptorsByName, setStringValue |
Methods inherited from class org.jaudiotagger.audio.asf.data.Chunk |
---|
getChunckEnd, getChunkEnd, getChunkLength, getGuid, getPosition, setPosition, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jaudiotagger.audio.asf.io.WriteableChunk |
---|
getGuid |
Field Detail |
---|
public static final java.util.Set<java.lang.String> ALLOWED
public static final java.lang.String KEY_AUTHOR
public static final java.lang.String KEY_COPYRIGHT
public static final java.lang.String KEY_DESCRIPTION
public static final java.lang.String KEY_RATING
public static final java.lang.String KEY_TITLE
Constructor Detail |
---|
public ContentDescription()
public ContentDescription(long pos, java.math.BigInteger chunkLen)
pos
- Position of content description within file or streamchunkLen
- Length of content description.Method Detail |
---|
public java.lang.String getAuthor()
public java.lang.String getComment()
public java.lang.String getCopyRight()
public long getCurrentAsfChunkSize()
getCurrentAsfChunkSize
in interface WriteableChunk
getCurrentAsfChunkSize
in class MetadataContainer
public java.lang.String getRating()
public java.lang.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 java.lang.String prettyPrint(java.lang.String prefix)
prettyPrint
in class MetadataContainer
prefix
- each line gets this string prepended.
public void setAuthor(java.lang.String fileAuthor) throws java.lang.IllegalArgumentException
fileAuthor
- The author to set.
java.lang.IllegalArgumentException
- If "UTF-16LE"-byte-representation would take more than 65535
bytes.public void setComment(java.lang.String tagComment) throws java.lang.IllegalArgumentException
tagComment
- The comment to set.
java.lang.IllegalArgumentException
- If "UTF-16LE"-byte-representation would take more than 65535
bytes.public void setCopyright(java.lang.String cpright) throws java.lang.IllegalArgumentException
cpright
- The copyRight to set.
java.lang.IllegalArgumentException
- If "UTF-16LE"-byte-representation would take more than 65535
bytes.public void setRating(java.lang.String ratingText) throws java.lang.IllegalArgumentException
ratingText
- The rating to be set.
java.lang.IllegalArgumentException
- If "UTF-16LE"-byte-representation would take more than 65535
bytes.public void setTitle(java.lang.String songTitle) throws java.lang.IllegalArgumentException
songTitle
- The title to set.
java.lang.IllegalArgumentException
- If "UTF-16LE"-byte-representation would take more than 65535
bytes.public long writeInto(java.io.OutputStream out) throws java.io.IOException
writeInto
in interface WriteableChunk
writeInto
in class MetadataContainer
out
- stream to write into.
java.io.IOException
- on I/O errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |