Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

entagged.common
Class Utils  view Utils download Utils.java

java.lang.Object
  extended byentagged.common.Utils

public class Utils
extends java.lang.Object

This Class is a regrouping of all functions that could not fit in another place or function of general use $Id: Utils.java,v 1.8 2003/09/29 13:05:18 kikidonk Exp $

Version:
v0.03

Field Summary
static java.lang.String EMPTY
          String displayed to indicate that the id3v1 Genre is empty
static java.lang.String EMPTY_INDEX
          Index equivalent of the Empty genre in ID3v1
static java.lang.String FFGenre
          Genre Associated with the 0xFF value in ID3v1 Tags
static java.lang.String[] genres
          Array containing the 126 genres defined for the ID3v1.1 plus winamp specials
private static java.lang.String[] langageFilenames
          The langage resources filenames
private static java.lang.String[] langageNames
          The corresponding langage Names in english
static java.lang.String RESOURCES_PATH
          Path to the resources files
static double screenHeight
          Resolution of the screen
static double screenWidth
          Resolution of the screen
static java.lang.String softwareName
          The Software name that use the freedb server
static java.lang.String softwareVersion
          The Software version that use the freedb server
static java.lang.String[] STANDARD_ID3_FIELDS
          Holds String array containing the fields for this version of ID3 tag
static java.lang.String VARIES
          String used, when the users select multiples files in the GUI, to indicate that a field contains information that aren't equal
static java.lang.String VARIES_INDEX
          Index Of the in the ID3v1genre comboBox
 
Constructor Summary
Utils()
           
 
Method Summary
static java.lang.String formatTrackNumber(int trackNumber, int totalTrackNumber, java.lang.String singleTrackFormat, java.lang.String totalTrackFormat, java.lang.String trackPattern)
           
static java.lang.String formatTrackNumber(int trackNumber, java.lang.String singleTrackFormat, java.lang.String trackPattern)
           
static java.lang.String getFormattedLength(int length)
           
static java.io.File[] toFileArray(java.util.Vector v)
          converts a Vector containing Object of File type , to an Array of File
static java.lang.String[] toStringArray(java.util.Vector v)
          converts a Vector containing Object of String type , to an Array of String
static java.lang.String translateGenre(int b)
          Computes String representation of the genre Index b
static java.lang.String translateGenre(java.lang.String name)
          Translate a genre in plain text in an index for id3v1 Genre (using a hashtable)
static java.lang.String translateLangageFilename(java.lang.String langageFilename)
          Returns the name of the given langage file
static java.lang.String translateLangageName(java.lang.String langageName)
          Returns the Filename of the given langage name
static short[] unsignedBytes(byte[] b)
          Converts the Java signed bytes into more useful short - unsigned bytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final java.lang.String EMPTY
String displayed to indicate that the id3v1 Genre is empty

See Also:
Constant Field Values

EMPTY_INDEX

public static final java.lang.String EMPTY_INDEX
Index equivalent of the Empty genre in ID3v1

See Also:
Constant Field Values

FFGenre

public static final java.lang.String FFGenre
Genre Associated with the 0xFF value in ID3v1 Tags

See Also:
Constant Field Values

RESOURCES_PATH

public static final java.lang.String RESOURCES_PATH
Path to the resources files

See Also:
Constant Field Values

STANDARD_ID3_FIELDS

public static final java.lang.String[] STANDARD_ID3_FIELDS
Holds String array containing the fields for this version of ID3 tag


VARIES

public static final java.lang.String VARIES
String used, when the users select multiples files in the GUI, to indicate that a field contains information that aren't equal

See Also:
Constant Field Values

VARIES_INDEX

public static final java.lang.String VARIES_INDEX
Index Of the in the ID3v1genre comboBox

See Also:
Constant Field Values

genres

public static final java.lang.String[] genres
Array containing the 126 genres defined for the ID3v1.1 plus winamp specials


softwareName

public static final java.lang.String softwareName
The Software name that use the freedb server

See Also:
Constant Field Values

softwareVersion

public static final java.lang.String softwareVersion
The Software version that use the freedb server

See Also:
Constant Field Values

langageFilenames

private static final java.lang.String[] langageFilenames
The langage resources filenames


langageNames

private static final java.lang.String[] langageNames
The corresponding langage Names in english


screenWidth

public static double screenWidth
Resolution of the screen


screenHeight

public static double screenHeight
Resolution of the screen

Constructor Detail

Utils

public Utils()
Method Detail

toFileArray

public static java.io.File[] toFileArray(java.util.Vector v)
converts a Vector containing Object of File type , to an Array of File


toStringArray

public static java.lang.String[] toStringArray(java.util.Vector v)
converts a Vector containing Object of String type , to an Array of String


translateGenre

public static java.lang.String translateGenre(int b)
Computes String representation of the genre Index b


translateGenre

public static java.lang.String translateGenre(java.lang.String name)
Translate a genre in plain text in an index for id3v1 Genre (using a hashtable)


translateLangageFilename

public static java.lang.String translateLangageFilename(java.lang.String langageFilename)
Returns the name of the given langage file


translateLangageName

public static java.lang.String translateLangageName(java.lang.String langageName)
Returns the Filename of the given langage name


unsignedBytes

public static short[] unsignedBytes(byte[] b)
Converts the Java signed bytes into more useful short - unsigned bytes


formatTrackNumber

public static java.lang.String formatTrackNumber(int trackNumber,
                                                 int totalTrackNumber,
                                                 java.lang.String singleTrackFormat,
                                                 java.lang.String totalTrackFormat,
                                                 java.lang.String trackPattern)

formatTrackNumber

public static java.lang.String formatTrackNumber(int trackNumber,
                                                 java.lang.String singleTrackFormat,
                                                 java.lang.String trackPattern)

getFormattedLength

public static java.lang.String getFormattedLength(int length)