FileDocCategorySizeDatePackage
AsfTagTextField.javaAPI DocJaudiotagger 2.0.42609Wed Mar 30 16:12:10 BST 2011org.jaudiotagger.tag.asf

AsfTagTextField

public class AsfTagTextField extends org.jaudiotagger.tag.asf.AsfTagField implements org.jaudiotagger.tag.TagTextField
Represents a tag text field for ASF fields.
author
Christian Laireiter

Fields Summary
Constructors Summary
public AsfTagTextField(org.jaudiotagger.tag.asf.AsfFieldKey field, String value)
Creates a tag text field and assigns the string value.

param
field ASF field to represent.
param
value the value to assign.

        super(field);
        toWrap.setString(value);
    
public AsfTagTextField(org.jaudiotagger.audio.asf.data.MetadataDescriptor source)
Creates an instance.

param
source The metadata descriptor, whose content is published.
Must not be of type {@link MetadataDescriptor#TYPE_BINARY}.

        super(source);
        if (source.getType() == MetadataDescriptor.TYPE_BINARY) {
            throw new IllegalArgumentException(
                    "Cannot interpret binary as string.");
        }
    
public AsfTagTextField(String fieldKey, String value)
Creates a tag text field and assigns the string value.

param
fieldKey The fields identifier.
param
value the value to assign.

        super(fieldKey);
        toWrap.setString(value);
    
Methods Summary
public java.lang.StringgetContent()
{@inheritDoc}

        return getDescriptor().getString();
    
public java.lang.StringgetEncoding()
{@inheritDoc}

        return AsfHeader.ASF_CHARSET.name();
    
public booleanisEmpty()

return
true if blank or only contains whitespace

        return Utils.isBlank(getContent());
    
public voidsetContent(java.lang.String content)
{@inheritDoc}

        getDescriptor().setString(content);
    
public voidsetEncoding(java.lang.String encoding)
{@inheritDoc}

        if (!AsfHeader.ASF_CHARSET.name().equals(encoding)) {
            throw new IllegalArgumentException(
                    "Only UTF-16LE is possible with ASF.");
        }