FileDocCategorySizeDatePackage
TagOptionSingleton.javaAPI DocJaudiotagger 2.0.433429Fri Oct 28 15:10:06 BST 2011org.jaudiotagger.tag

TagOptionSingleton

public class TagOptionSingleton extends Object
author
: Paul Taylor
author
: Eric Farng Version @version:$Id: TagOptionSingleton.java 1010 2011-10-28 13:10:04Z paultaylor $ MusicTag Copyright (C)2003,2004 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, you can get a copy from http://www.opensource.org/licenses/lgpl-license.php or write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Description: Options that are used for every datatype and class in this library.

Fields Summary
private static HashMap
tagOptionTable
private static String
DEFAULT
private static String
defaultOptions
private HashMap
keywordMap
private HashMap
lyrics3SaveFieldMap
Map of lyric ID's to Boolean objects if we should or should not save the specific Kyrics3 field. Defaults to true.
private HashMap
parenthesisMap
parenthesis map stuff
private HashMap
replaceWordMap
HashMap listing words to be replaced if found
private String
language
default language for any ID3v2 tags frameswhich require it. This string is in the [ISO-639-2] ISO/FDIS 639-2 definition
private boolean
filenameTagSave
private boolean
id3v1Save
if we should save any fields of the ID3v1 tag or not. Defaults to true.
private boolean
id3v1SaveAlbum
if we should save the album field of the ID3v1 tag or not. Defaults to true.
private boolean
id3v1SaveArtist
if we should save the artist field of the ID3v1 tag or not. Defaults to true.
private boolean
id3v1SaveComment
if we should save the comment field of the ID3v1 tag or not. Defaults to true.
private boolean
id3v1SaveGenre
if we should save the genre field of the ID3v1 tag or not. Defaults to true.
private boolean
id3v1SaveTitle
if we should save the title field of the ID3v1 tag or not. Defaults to true.
private boolean
id3v1SaveTrack
if we should save the track field of the ID3v1 tag or not. Defaults to true.
private boolean
id3v1SaveYear
if we should save the year field of the ID3v1 tag or not. Defaults to true.
private boolean
id3v2PaddingCopyTag
When adjusting the ID3v2 padding, if should we copy the current ID3v2 tag to the new MP3 file. Defaults to true.
private boolean
id3v2PaddingWillShorten
When adjusting the ID3v2 padding, if we should shorten the length of the ID3v2 tag padding. Defaults to false.
private boolean
id3v2Save
if we should save any fields of the ID3v2 tag or not. Defaults to true.
private boolean
lyrics3KeepEmptyFieldIfRead
if we should keep an empty Lyrics3 field while we're reading. This is different from a string of white space. Defaults to false.
private boolean
lyrics3Save
if we should save any fields of the Lyrics3 tag or not. Defaults to true.
private boolean
lyrics3SaveEmptyField
if we should save empty Lyrics3 field or not. Defaults to false.

todo I don't think this is implemented yet.

private boolean
originalSavedAfterAdjustingID3v2Padding
private byte
timeStampFormat
default time stamp format for any ID3v2 tag frames which require it.
private int
numberMP3SyncFrame
number of frames to sync when trying to find the start of the MP3 frame data. The start of the MP3 frame data is the start of the music and is different from the ID3v2 frame data.
private boolean
unsyncTags
Unsynchronize tags/frames this is rarely required these days and can cause more problems than it solves
private boolean
removeTrailingTerminatorOnWrite
iTunes needlessly writes null terminators at the end for TextEncodedStringSizeTerminated values, if this option is enabled these characters are removed
private byte
id3v23DefaultTextEncoding
This is the default text encoding to use for new v23 frames, when unicode is required UTF16 will always be used because that is the only valid option for v23.
private byte
id3v24DefaultTextEncoding
This is the default text encoding to use for new v24 frames, it defaults to simple ISO8859 but by changing this value you could always used UTF8 for example whether you needed to or not
private byte
id3v24UnicodeTextEncoding
This is text encoding to use for new v24 frames when unicode is required, it defaults to UTF16 just because this encoding is understand by all ID3 versions
private boolean
resetTextEncodingForExistingFrames
When writing frames if this is set to true then the frame will be written using the defaults disregarding the text encoding originally used to create the frame.
private boolean
truncateTextWithoutErrors
Some formats impose maxmimum lengths for fields , if the text provided is longer than the formats allows it will truncate and write a warning, if this is not set it will throw an exception
private boolean
padNumbers
Frames such as TRCK and TPOS sometimes pad single digit numbers to aid sorting
private boolean
isAndroid
There are a couple of problems with the Java implementation on Google Android, enabling this value switches on Google workarounds
private boolean
isEncodeUTF16BomAsLittleEndian
When you specify a field should be stored as UTF16 in ID3 this means write with BOM indicating whether written as Little Endian or Big Endian, its defaults to little Endian
private int
playerCompatability
When this is set and using the generic interface jaudiotagger will make some adjustments when saving field so they work best with the specified Tagger
private long
writeChunkSize
max size of data to copy when copying audiodata from one file to another
private boolean
isWriteMp4GenresAsText
Constructors Summary
private TagOptionSingleton()
Creates a new TagOptions datatype. All Options are set to their default values


                      
     
    
        setToDefault();
    
Methods Summary
public voidaddKeyword(java.lang.Class id3v2FrameBodyClass, java.lang.String keyword)

param
id3v2FrameBodyClass
param
keyword
throws
TagException

        if (!AbstractID3v2FrameBody.class.isAssignableFrom(id3v2FrameBodyClass))
        {
            throw new TagException("Invalid class type. Must be AbstractId3v2FrameBody " + id3v2FrameBodyClass);
        }

        if ((keyword != null) && (keyword.length() > 0))
        {
            LinkedList<String> keywordList;

            if (!keywordMap.containsKey(id3v2FrameBodyClass))
            {
                keywordList = new LinkedList<String>();
                keywordMap.put(id3v2FrameBodyClass, keywordList);
            }
            else
            {
                keywordList = keywordMap.get(id3v2FrameBodyClass);
            }

            keywordList.add(keyword);
        }
    
public voidaddParenthesis(java.lang.String open, java.lang.String close)

param
open
param
close

        parenthesisMap.put(open, close);
    
public voidaddReplaceWord(java.lang.String oldWord, java.lang.String newWord)

param
oldWord
param
newWord

        replaceWordMap.put(oldWord, newWord);
    
public bytegetId3v23DefaultTextEncoding()
Get the default text encoding to use for new v23 frames, when unicode is required UTF16 will always be used because that is the only valid option for v23/v22

return

        return id3v23DefaultTextEncoding;
    
public bytegetId3v24DefaultTextEncoding()
Get the default text encoding to use for new v24 frames, it defaults to simple ISO8859 but by changing this value you could always used UTF8 for example whether you needed to or not

return

        return id3v24DefaultTextEncoding;
    
public bytegetId3v24UnicodeTextEncoding()
Get the text encoding to use for new v24 frames when unicode is required, it defaults to UTF16 just because this encoding is understand by all ID3 versions

return

        return id3v24UnicodeTextEncoding;
    
public static org.jaudiotagger.tag.TagOptionSingletongetInstance()

return

        return getInstance(defaultOptions);
    
public static org.jaudiotagger.tag.TagOptionSingletongetInstance(java.lang.String instanceKey)

param
instanceKey
return

        TagOptionSingleton tagOptions = tagOptionTable.get(instanceKey);

        if (tagOptions == null)
        {
            tagOptions = new TagOptionSingleton();
            tagOptionTable.put(instanceKey, tagOptions);
        }

        return tagOptions;
    
public static java.lang.StringgetInstanceKey()

return

        return defaultOptions;
    
public java.util.IteratorgetKeywordIterator()

return

        return keywordMap.keySet().iterator();
    
public java.util.IteratorgetKeywordListIterator(java.lang.Class id3v2_4FrameBody)

param
id3v2_4FrameBody
return

        return keywordMap.get(id3v2_4FrameBody).iterator();
    
public java.lang.StringgetLanguage()
Returns the default language for any ID3v2 tag frames which require it.

return
language ID, [ISO-639-2] ISO/FDIS 639-2 definition

        return language;
    
public booleangetLyrics3SaveField(java.lang.String id)
Returns true if we should save the Lyrics3 field asked for in the argument. Defaults to true.

param
id Lyrics3 id string
return
true if we should save the Lyrics3 field.

        return lyrics3SaveFieldMap.get(id);
    
public java.util.HashMapgetLyrics3SaveFieldMap()

return

        return lyrics3SaveFieldMap;
    
public java.lang.StringgetNewReplaceWord(java.lang.String oldWord)

param
oldWord
return

        return replaceWordMap.get(oldWord);
    
public intgetNumberMP3SyncFrame()
Returns the number of MP3 frames to sync when trying to find the start of the MP3 frame data. The start of the MP3 frame data is the start of the music and is different from the ID3v2 frame data. WinAmp 2.8 seems to sync 3 frames. Default is 5.

return
number of MP3 frames to sync

        return numberMP3SyncFrame;
    
public java.util.IteratorgetOldReplaceWordIterator()

return

        return replaceWordMap.keySet().iterator();
    
public java.util.IteratorgetOpenParenthesisIterator()

return

        return parenthesisMap.keySet().iterator();
    
public intgetPlayerCompatability()
When this is set and using the generic interface jaudiotagger will make some adjustmensts when saving field sso they work best with the specified Tagger

        return playerCompatability;
    
public bytegetTimeStampFormat()
Returns the default time stamp format for ID3v2 tags which require it.

$01 Absolute time, 32 bit sized, using MPEG frames as unit
$02 Absolute time, 32 bit sized, using milliseconds as unit

return
the default time stamp format

        return timeStampFormat;
    
public longgetWriteChunkSize()
When we have to create new audio files and shift audio data to fit in more metadata this value set the maximum amount in bytes that can be transferred in one call, this is to protect against various OutOfMemoryExceptions that cna occur, especially on networked filesystems.

        return writeChunkSize;
    
public booleanisAndroid()

        return isAndroid;
    
public booleanisEncodeUTF16BomAsLittleEndian()
When you specify a field should be stored as UTF16 in ID3 this means write with BOM indicating whether written as Little Endian or Big Endian, its defaults to little Endian

        return isEncodeUTF16BomAsLittleEndian;
    
public booleanisFilenameTagSave()

return

        return filenameTagSave;
    
public booleanisId3v1Save()

return

        return id3v1Save;
    
public booleanisId3v1SaveAlbum()

return

        return id3v1SaveAlbum;
    
public booleanisId3v1SaveArtist()

return

        return id3v1SaveArtist;
    
public booleanisId3v1SaveComment()

return

        return id3v1SaveComment;
    
public booleanisId3v1SaveGenre()

return

        return id3v1SaveGenre;
    
public booleanisId3v1SaveTitle()

return

        return id3v1SaveTitle;
    
public booleanisId3v1SaveTrack()

return

        return id3v1SaveTrack;
    
public booleanisId3v1SaveYear()

return

        return id3v1SaveYear;
    
public booleanisId3v2PaddingCopyTag()

return

        return id3v2PaddingCopyTag;
    
public booleanisId3v2PaddingWillShorten()

return

        return id3v2PaddingWillShorten;
    
public booleanisId3v2Save()

return

        return id3v2Save;
    
public booleanisLyrics3KeepEmptyFieldIfRead()

return

        return lyrics3KeepEmptyFieldIfRead;
    
public booleanisLyrics3Save()

return

        return lyrics3Save;
    
public booleanisLyrics3SaveEmptyField()

return

        return lyrics3SaveEmptyField;
    
public booleanisOpenParenthesis(java.lang.String open)

param
open
return

        return parenthesisMap.containsKey(open);
    
public booleanisOriginalSavedAfterAdjustingID3v2Padding()

return

        return originalSavedAfterAdjustingID3v2Padding;
    
public booleanisPadNumbers()

        return padNumbers;
    
public booleanisRemoveTrailingTerminatorOnWrite()
Do we remove unnecessary trailing null characters on write

return
true if we remove unnecessary trailing null characters on write

        return removeTrailingTerminatorOnWrite;
    
public booleanisResetTextEncodingForExistingFrames()
When writing frames if this is set to true then the frame will be written using the defaults disregarding the text encoding originally used to create the frame.

return

        return resetTextEncodingForExistingFrames;
    
public booleanisTruncateTextWithoutErrors()

return
truncate without errors

        return truncateTextWithoutErrors;
    
public booleanisUnsyncTags()

return
are tags unsynchronized when written if contain bit pattern that could be mistaken for audio marker

        return unsyncTags;
    
public booleanisWriteMp4GenresAsText()
If enabled we always use the ©gen atom rather than the gnre atom when writing genres to mp4s This is known to help some android apps

        return isWriteMp4GenresAsText;
    
public voidsetAndroid(boolean android)

        isAndroid = android;
    
public voidsetEncodeUTF16BomAsLittleEndian(boolean encodeUTF16BomAsLittleEndian)

        isEncodeUTF16BomAsLittleEndian = encodeUTF16BomAsLittleEndian;
    
public voidsetFilenameTagSave(boolean filenameTagSave)

param
filenameTagSave

        this.filenameTagSave = filenameTagSave;
    
public voidsetId3v1Save(boolean id3v1Save)

param
id3v1Save

        this.id3v1Save = id3v1Save;
    
public voidsetId3v1SaveAlbum(boolean id3v1SaveAlbum)

param
id3v1SaveAlbum

        this.id3v1SaveAlbum = id3v1SaveAlbum;
    
public voidsetId3v1SaveArtist(boolean id3v1SaveArtist)

param
id3v1SaveArtist

        this.id3v1SaveArtist = id3v1SaveArtist;
    
public voidsetId3v1SaveComment(boolean id3v1SaveComment)

param
id3v1SaveComment

        this.id3v1SaveComment = id3v1SaveComment;
    
public voidsetId3v1SaveGenre(boolean id3v1SaveGenre)

param
id3v1SaveGenre

        this.id3v1SaveGenre = id3v1SaveGenre;
    
public voidsetId3v1SaveTitle(boolean id3v1SaveTitle)

param
id3v1SaveTitle

        this.id3v1SaveTitle = id3v1SaveTitle;
    
public voidsetId3v1SaveTrack(boolean id3v1SaveTrack)

param
id3v1SaveTrack

        this.id3v1SaveTrack = id3v1SaveTrack;
    
public voidsetId3v1SaveYear(boolean id3v1SaveYear)

param
id3v1SaveYear

        this.id3v1SaveYear = id3v1SaveYear;
    
public voidsetId3v23DefaultTextEncoding(byte id3v23DefaultTextEncoding)
Set the default text encoding to use for new v23 frames, when unicode is required UTF16 will always be used because that is the only valid option for v23/v22

param
id3v23DefaultTextEncoding

        if ((id3v23DefaultTextEncoding == TextEncoding.ISO_8859_1) || (id3v23DefaultTextEncoding == TextEncoding.UTF_16))
        {
            this.id3v23DefaultTextEncoding = id3v23DefaultTextEncoding;
        }
    
public voidsetId3v24DefaultTextEncoding(byte id3v24DefaultTextEncoding)
Set the default text encoding to use for new v24 frames, it defaults to simple ISO8859 but by changing this value you could always used UTF8 for example whether you needed to or not

param
id3v24DefaultTextEncoding

        if ((id3v24DefaultTextEncoding == TextEncoding.ISO_8859_1) || (id3v24DefaultTextEncoding == TextEncoding.UTF_16) || (id3v24DefaultTextEncoding == TextEncoding.UTF_16BE) || (id3v24DefaultTextEncoding == TextEncoding.UTF_8))
        {
            this.id3v24DefaultTextEncoding = id3v24DefaultTextEncoding;
        }

    
public voidsetId3v24UnicodeTextEncoding(byte id3v24UnicodeTextEncoding)
Set the text encoding to use for new v24 frames when unicode is required, it defaults to UTF16 just because this encoding is understand by all ID3 versions

param
id3v24UnicodeTextEncoding

        if ((id3v24UnicodeTextEncoding == TextEncoding.UTF_16) || (id3v24UnicodeTextEncoding == TextEncoding.UTF_16BE) || (id3v24UnicodeTextEncoding == TextEncoding.UTF_8))
        {
            this.id3v24UnicodeTextEncoding = id3v24UnicodeTextEncoding;
        }
    
public voidsetId3v2PaddingCopyTag(boolean id3v2PaddingCopyTag)

param
id3v2PaddingCopyTag

        this.id3v2PaddingCopyTag = id3v2PaddingCopyTag;
    
public voidsetId3v2PaddingWillShorten(boolean id3v2PaddingWillShorten)

param
id3v2PaddingWillShorten

        this.id3v2PaddingWillShorten = id3v2PaddingWillShorten;
    
public voidsetId3v2Save(boolean id3v2Save)

param
id3v2Save

        this.id3v2Save = id3v2Save;
    
public voidsetInstanceKey(java.lang.String instanceKey)

param
instanceKey

        TagOptionSingleton.defaultOptions = instanceKey;
    
public voidsetLanguage(java.lang.String lang)
Sets the default language for any ID3v2 tag frames which require it. While the value will already exist when reading from a file, this value will be used when a new ID3v2 Frame is created from scratch.

param
lang language ID, [ISO-639-2] ISO/FDIS 639-2 definition

        if (Languages.getInstanceOf().getIdToValueMap().containsKey(lang))
        {
            language = lang;
        }
    
public voidsetLyrics3KeepEmptyFieldIfRead(boolean lyrics3KeepEmptyFieldIfRead)

param
lyrics3KeepEmptyFieldIfRead

        this.lyrics3KeepEmptyFieldIfRead = lyrics3KeepEmptyFieldIfRead;
    
public voidsetLyrics3Save(boolean lyrics3Save)

param
lyrics3Save

        this.lyrics3Save = lyrics3Save;
    
public voidsetLyrics3SaveEmptyField(boolean lyrics3SaveEmptyField)

param
lyrics3SaveEmptyField

        this.lyrics3SaveEmptyField = lyrics3SaveEmptyField;
    
public voidsetLyrics3SaveField(java.lang.String id, boolean save)
Sets if we should save the Lyrics3 field. Defaults to true.

param
id Lyrics3 id string
param
save true if you want to save this specific Lyrics3 field.

        this.lyrics3SaveFieldMap.put(id, save);
    
public voidsetNumberMP3SyncFrame(int numberMP3SyncFrame)
Sets the number of MP3 frames to sync when trying to find the start of the MP3 frame data. The start of the MP3 frame data is the start of the music and is different from the ID3v2 frame data. WinAmp 2.8 seems to sync 3 frames. Default is 5.

param
numberMP3SyncFrame number of MP3 frames to sync

        this.numberMP3SyncFrame = numberMP3SyncFrame;
    
public voidsetOriginalSavedAfterAdjustingID3v2Padding(boolean originalSavedAfterAdjustingID3v2Padding)

param
originalSavedAfterAdjustingID3v2Padding

        this.originalSavedAfterAdjustingID3v2Padding = originalSavedAfterAdjustingID3v2Padding;
    
public voidsetPadNumbers(boolean padNumbers)

        this.padNumbers = padNumbers;
    
public voidsetPlayerCompatability(int playerCompatability)

        this.playerCompatability = playerCompatability;
    
public voidsetRemoveTrailingTerminatorOnWrite(boolean removeTrailingTerminatorOnWrite)
Remove unnecessary trailing null characters on write

param
removeTrailingTerminatorOnWrite

        this.removeTrailingTerminatorOnWrite = removeTrailingTerminatorOnWrite;
    
public voidsetResetTextEncodingForExistingFrames(boolean resetTextEncodingForExistingFrames)
When writing frames if this is set to true then the frame will be written using the defaults disregarding the text encoding originally used to create the frame.

param
resetTextEncodingForExistingFrames

        this.resetTextEncodingForExistingFrames = resetTextEncodingForExistingFrames;
    
public voidsetTimeStampFormat(byte tsf)
Sets the default time stamp format for ID3v2 tags which require it. While the value will already exist when reading from a file, this value will be used when a new ID3v2 Frame is created from scratch.

$01 Absolute time, 32 bit sized, using MPEG frames as unit
$02 Absolute time, 32 bit sized, using milliseconds as unit

param
tsf the new default time stamp format

        if ((tsf == 1) || (tsf == 2))
        {
            timeStampFormat = tsf;
        }
    
public voidsetToDefault()

        keywordMap = new HashMap<Class<? extends ID3v24FrameBody>, LinkedList<String>>();
        filenameTagSave = false;
        id3v1Save = true;
        id3v1SaveAlbum = true;
        id3v1SaveArtist = true;
        id3v1SaveComment = true;
        id3v1SaveGenre = true;
        id3v1SaveTitle = true;
        id3v1SaveTrack = true;
        id3v1SaveYear = true;
        id3v2PaddingCopyTag = true;
        id3v2PaddingWillShorten = false;
        id3v2Save = true;
        language = "eng";
        lyrics3KeepEmptyFieldIfRead = false;
        lyrics3Save = true;
        lyrics3SaveEmptyField = false;
        lyrics3SaveFieldMap = new HashMap<String, Boolean>();
        numberMP3SyncFrame = 3;
        parenthesisMap = new HashMap<String, String>();
        replaceWordMap = new HashMap<String, String>();
        timeStampFormat = 2;
        unsyncTags = false;
        removeTrailingTerminatorOnWrite = true;
        id3v23DefaultTextEncoding = TextEncoding.ISO_8859_1;
        id3v24DefaultTextEncoding = TextEncoding.ISO_8859_1;
        id3v24UnicodeTextEncoding = TextEncoding.UTF_16;
        resetTextEncodingForExistingFrames = false;
        truncateTextWithoutErrors = false;
        padNumbers = false;
        isAndroid = false;
        isEncodeUTF16BomAsLittleEndian = true;
        writeChunkSize=5000000;
        isWriteMp4GenresAsText=false;

        //default all lyrics3 fields to save. id3v1 fields are individual
        // settings. id3v2 fields are always looked at to save.
        Iterator<String> iterator = Lyrics3v2Fields.getInstanceOf().getIdToValueMap().keySet().iterator();
        String fieldId;

        while (iterator.hasNext())
        {
            fieldId = iterator.next();
            lyrics3SaveFieldMap.put(fieldId, true);
        }

        try
        {
            addKeyword(FrameBodyCOMM.class, "ultimix");
            addKeyword(FrameBodyCOMM.class, "dance");
            addKeyword(FrameBodyCOMM.class, "mix");
            addKeyword(FrameBodyCOMM.class, "remix");
            addKeyword(FrameBodyCOMM.class, "rmx");
            addKeyword(FrameBodyCOMM.class, "live");
            addKeyword(FrameBodyCOMM.class, "cover");
            addKeyword(FrameBodyCOMM.class, "soundtrack");
            addKeyword(FrameBodyCOMM.class, "version");
            addKeyword(FrameBodyCOMM.class, "acoustic");
            addKeyword(FrameBodyCOMM.class, "original");
            addKeyword(FrameBodyCOMM.class, "cd");
            addKeyword(FrameBodyCOMM.class, "extended");
            addKeyword(FrameBodyCOMM.class, "vocal");
            addKeyword(FrameBodyCOMM.class, "unplugged");
            addKeyword(FrameBodyCOMM.class, "acapella");
            addKeyword(FrameBodyCOMM.class, "edit");
            addKeyword(FrameBodyCOMM.class, "radio");
            addKeyword(FrameBodyCOMM.class, "original");
            addKeyword(FrameBodyCOMM.class, "album");
            addKeyword(FrameBodyCOMM.class, "studio");
            addKeyword(FrameBodyCOMM.class, "instrumental");
            addKeyword(FrameBodyCOMM.class, "unedited");
            addKeyword(FrameBodyCOMM.class, "karoke");
            addKeyword(FrameBodyCOMM.class, "quality");
            addKeyword(FrameBodyCOMM.class, "uncensored");
            addKeyword(FrameBodyCOMM.class, "clean");
            addKeyword(FrameBodyCOMM.class, "dirty");

            addKeyword(FrameBodyTIPL.class, "f.");
            addKeyword(FrameBodyTIPL.class, "feat");
            addKeyword(FrameBodyTIPL.class, "feat.");
            addKeyword(FrameBodyTIPL.class, "featuring");
            addKeyword(FrameBodyTIPL.class, "ftng");
            addKeyword(FrameBodyTIPL.class, "ftng.");
            addKeyword(FrameBodyTIPL.class, "ft.");
            addKeyword(FrameBodyTIPL.class, "ft");

            iterator = GenreTypes.getInstanceOf().getValueToIdMap().keySet().iterator();

            while (iterator.hasNext())
            {
                addKeyword(FrameBodyCOMM.class, iterator.next());
            }
        }
        catch (TagException ex)
        {
            // this shouldn't happen, indicates coding error
            throw new RuntimeException(ex);
        }


        addReplaceWord("v.", "vs.");
        addReplaceWord("vs.", "vs.");
        addReplaceWord("versus", "vs.");
        addReplaceWord("f.", "feat.");
        addReplaceWord("feat", "feat.");
        addReplaceWord("featuring", "feat.");
        addReplaceWord("ftng.", "feat.");
        addReplaceWord("ftng", "feat.");
        addReplaceWord("ft.", "feat.");
        addReplaceWord("ft", "feat.");


        iterator = this.getKeywordListIterator(FrameBodyTIPL.class);


        addParenthesis("(", ")");
        addParenthesis("[", "]");
        addParenthesis("{", "}");
        addParenthesis("<", ">");
    
public voidsetTruncateTextWithoutErrors(boolean truncateTextWithoutErrors)
Set truncate without errors

param
truncateTextWithoutErrors

        this.truncateTextWithoutErrors = truncateTextWithoutErrors;
    
public voidsetUnsyncTags(boolean unsyncTags)
Unsync tag where necessary, currently only applies to IDv23

param
unsyncTags set whether tags are unsynchronized when written if contain bit pattern that could be mistaken for audio marker

        this.unsyncTags = unsyncTags;
    
public voidsetWriteChunkSize(long writeChunkSize)

        this.writeChunkSize = writeChunkSize;
    
public voidsetWriteMp4GenresAsText(boolean writeMp4GenresAsText)

        isWriteMp4GenresAsText = writeMp4GenresAsText;