FileDocCategorySizeDatePackage
AbstractTagDisplayFormatter.javaAPI DocJaudiotagger 2.0.43913Wed Mar 30 16:11:54 BST 2011org.jaudiotagger.logging

AbstractTagDisplayFormatter

public abstract class AbstractTagDisplayFormatter extends Object
Abstract class that provides structure to use for displaying a files metadata content

Fields Summary
protected int
level
private static HashMap
hexBinaryMap
Constructors Summary
Methods Summary
public abstract voidaddElement(java.lang.String type, java.lang.String value)

public abstract voidaddElement(java.lang.String type, int value)

public abstract voidaddElement(java.lang.String type, boolean value)

public abstract voidcloseHeadingElement(java.lang.String type)

public static java.lang.StringdisplayAsBinary(byte buffer)
Use to display headers as their binary representation

param
buffer
return


          

          

          


        

          

          

          

       

                    
        
    
        //Convert buffer to hex representation
        String hexValue = Integer.toHexString(buffer);
        String char1 = "";
        String char2 = "";
        try
        {
            if (hexValue.length() == 8)
            {
                char1 = hexValue.substring(6, 7);
                char2 = hexValue.substring(7, 8);
            }
            else if (hexValue.length() == 2)
            {
                char1 = hexValue.substring(0, 1);
                char2 = hexValue.substring(1, 2);
            }
            else if (hexValue.length() == 1)
            {
                char1 = "0";
                char2 = hexValue.substring(0, 1);
            }
        }
        catch (StringIndexOutOfBoundsException se)
        {
            return "";
        }
        return hexBinaryMap.get(char1) + hexBinaryMap.get(char2);
    
public abstract voidopenHeadingElement(java.lang.String type, java.lang.String value)

public abstract voidopenHeadingElement(java.lang.String type, boolean value)

public abstract voidopenHeadingElement(java.lang.String type, int value)

public abstract java.lang.StringtoString()