org.jaudiotagger.audio.generic
Class GenericTag.GenericTagTextField

java.lang.Object
  extended by org.jaudiotagger.audio.generic.GenericTag.GenericTagTextField
All Implemented Interfaces:
TagField, TagTextField
Enclosing class:
GenericTag

private class GenericTag.GenericTagTextField
extends java.lang.Object
implements TagTextField

Implementations of TagTextField for use with "ISO-8859-1" strings.

Author:
Raphaƫl Slinckx

Field Summary
private  java.lang.String content
          Stores the string.
private  java.lang.String id
          Stores the identifier.
 
Constructor Summary
GenericTag.GenericTagTextField(java.lang.String fieldId, java.lang.String initialContent)
          Creates an instance.
 
Method Summary
 void copyContent(TagField field)
          (overridden)
 java.lang.String getContent()
          (overridden)
 java.lang.String getEncoding()
          (overridden)
 java.lang.String getId()
          (overridden)
 byte[] getRawContent()
          (overridden)
 boolean isBinary()
          (overridden)
 void isBinary(boolean b)
          (overridden)
 boolean isCommon()
          (overridden)
 boolean isEmpty()
          (overridden)
 void setContent(java.lang.String s)
          (overridden)
 void setEncoding(java.lang.String s)
          (overridden)
 java.lang.String toString()
          (overridden)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

content

private java.lang.String content
Stores the string.


id

private final java.lang.String id
Stores the identifier.

Constructor Detail

GenericTag.GenericTagTextField

public GenericTag.GenericTagTextField(java.lang.String fieldId,
                                      java.lang.String initialContent)
Creates an instance.

Parameters:
fieldId - The identifier.
initialContent - The string.
Method Detail

copyContent

public void copyContent(TagField field)
(overridden)

Specified by:
copyContent in interface TagField
Parameters:
field - The field containing the data to be taken.
See Also:
TagField.copyContent(org.jaudiotagger.tag.TagField)

getContent

public java.lang.String getContent()
(overridden)

Specified by:
getContent in interface TagTextField
Returns:
Content
See Also:
TagTextField.getContent()

getEncoding

public java.lang.String getEncoding()
(overridden)

Specified by:
getEncoding in interface TagTextField
Returns:
Charset encoding.
See Also:
TagTextField.getEncoding()

getId

public java.lang.String getId()
(overridden)

Specified by:
getId in interface TagField
Returns:
Unique identifier for the fields type. (title, artist...)
See Also:
TagField.getId()

getRawContent

public byte[] getRawContent()
(overridden)

Specified by:
getRawContent in interface TagField
Returns:
Binary data representing the current tag field.
See Also:
TagField.getRawContent()

isBinary

public boolean isBinary()
(overridden)

Specified by:
isBinary in interface TagField
Returns:
true if field represents binary data (not human readable).
See Also:
TagField.isBinary()

isBinary

public void isBinary(boolean b)
(overridden)

Specified by:
isBinary in interface TagField
Parameters:
b - true, if the field contains binary data. //@deprecated As for now is of no use. Implementations should use another // way of setting this property.
See Also:
TagField.isBinary(boolean)

isCommon

public boolean isCommon()
(overridden)

Specified by:
isCommon in interface TagField
Returns:
true if the field is of common use.
See Also:
TagField.isCommon()

isEmpty

public boolean isEmpty()
(overridden)

Specified by:
isEmpty in interface TagField
Returns:
true if no data is stored (or empty String).
See Also:
TagField.isEmpty()

setContent

public void setContent(java.lang.String s)
(overridden)

Specified by:
setContent in interface TagTextField
Parameters:
s - fields content.
See Also:
TagTextField.setContent(java.lang.String)

setEncoding

public void setEncoding(java.lang.String s)
(overridden)

Specified by:
setEncoding in interface TagTextField
Parameters:
s - charset.
See Also:
TagTextField.setEncoding(java.lang.String)

toString

public java.lang.String toString()
(overridden)

Specified by:
toString in interface TagField
Overrides:
toString in class java.lang.Object
Returns:
Description of the fields content.
See Also:
Object.toString()