net.sf.ext.entagged.libraries.utils
Class Utils

java.lang.Object
  extended bynet.sf.ext.entagged.libraries.utils.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.1 2004/09/17 07:15:48 rwaals Exp $

Version:
v0.03
Author:
Rapha?l Slinckx (KiKiDonK)

Field Summary
static java.lang.String clientDomain
          The client e-mail address domain (freedb)
static java.lang.String clientLogin
          The client e-mail address (freedb)
static java.io.File FORMATS_DIRECTORY
          Path to audio formats plugins
static java.lang.String[] GENRES
          Array containing the 126 genres defined for the ID3v1.1 plus winamp specials
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.io.File THEMEFOLDER
          Path to Skin LAF Themes
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
 
Constructor Summary
Utils()
           
 
Method Summary
static java.util.Vector getColumnsInModelOrder(javax.swing.JTable table)
           
static java.lang.String getExtension(java.io.File f)
           
static java.lang.String getFormattedLength(int length)
           
static java.lang.String getRawExtension(java.io.File f)
           
static int readInteger(byte b1, byte b2)
           
static int readInteger(byte b1, byte b2, byte b3)
           
static int readInteger(byte b1, byte b2, byte b3, byte b4)
           
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 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 int unsignedBytes(byte b)
           
static int[] 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

RESOURCES_PATH

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

See Also:
Constant Field Values

FORMATS_DIRECTORY

public static final java.io.File FORMATS_DIRECTORY
Path to audio formats plugins


THEMEFOLDER

public static final java.io.File THEMEFOLDER
Path to Skin LAF Themes


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

clientDomain

public static final java.lang.String clientDomain
The client e-mail address domain (freedb)

See Also:
Constant Field Values

clientLogin

public static final java.lang.String clientLogin
The client e-mail address (freedb)

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


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

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

getFormattedLength

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

toFileArray

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

Parameters:
v - a vector containing String objects only
Returns:
a File[] from the vector v

toStringArray

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

Parameters:
v - a vector containing String objects only
Returns:
a String[] from the vector v

translateLangageFilename

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

Parameters:
langageFilename - Description of the Parameter
Returns:
the name of the langage in English

translateLangageName

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

Parameters:
langageName - the langage name
Returns:
the langage filename

unsignedBytes

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

Parameters:
b - a byte array to be converted
Returns:
a short array containing the unsigned bytes

unsignedBytes

public static int unsignedBytes(byte b)

getExtension

public static java.lang.String getExtension(java.io.File f)

getRawExtension

public static java.lang.String getRawExtension(java.io.File f)

getColumnsInModelOrder

public static java.util.Vector getColumnsInModelOrder(javax.swing.JTable table)

readInteger

public static int readInteger(byte b1,
                              byte b2,
                              byte b3,
                              byte b4)

readInteger

public static int readInteger(byte b1,
                              byte b2,
                              byte b3)

readInteger

public static int readInteger(byte b1,
                              byte b2)