net.sourceforge.neurosdbm.db
Class Util

java.lang.Object
  extended bynet.sourceforge.neurosdbm.db.Util

public class Util
extends java.lang.Object


Constructor Summary
Util()
           
 
Method Summary
static java.lang.String byteOffsetDebug(int byteOffset)
           
private static boolean convertExtendedASCII(char c, java.lang.StringBuffer buf)
           
static void copyRecurse(java.lang.String target, java.lang.String destination)
          This function copies a whole directory tree from one location to another.
static boolean deleteDir(java.io.File f)
           
static boolean deleteDir(java.lang.String dir)
           
static void fileCopy(java.lang.String sourcePath, java.lang.String destinationPath, java.lang.String filename)
           
static void fileCopy(java.lang.String sourcePath, java.lang.String destinationPath, java.lang.String sourceFilename, java.lang.String destinationFilename)
           
static java.lang.String fixGenre(java.lang.String oldGenre)
           
static java.lang.String getExtension(java.io.File f)
           
static java.lang.String getFreeSpace()
           
static java.lang.String intAsHex(int value)
           
static boolean isExtendedASCII(char c)
           
static java.lang.String randomString(int length)
           
static java.lang.String removeExtendedASCII(java.lang.String oldString)
           
static java.lang.String removeIllegalCharsFromDirectory(java.lang.String oldString)
           
static java.lang.String removeIllegalCharsFromFilename(java.lang.String oldString)
           
static java.lang.String removeNulls(java.lang.String oldString)
           
static java.lang.String replaceExtendedASCII(java.lang.String oldString)
           
static java.lang.String timeDisplay(long time)
           
(package private) static int woidOffset(java.nio.ByteBuffer bytes, int offset)
           
static java.lang.String wordOffsetDebug(int wordOffset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

intAsHex

public static java.lang.String intAsHex(int value)

byteOffsetDebug

public static java.lang.String byteOffsetDebug(int byteOffset)

wordOffsetDebug

public static java.lang.String wordOffsetDebug(int wordOffset)

fileCopy

public static void fileCopy(java.lang.String sourcePath,
                            java.lang.String destinationPath,
                            java.lang.String filename)
                     throws java.io.FileNotFoundException,
                            java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

copyRecurse

public static void copyRecurse(java.lang.String target,
                               java.lang.String destination)
                        throws java.io.FileNotFoundException,
                               java.io.IOException
This function copies a whole directory tree from one location to another.

Parameters:
target - the directory Where you are copying from
destination - the directory where you are copying to
Throws:
java.io.FileNotFoundException
java.io.IOException

fileCopy

public static void fileCopy(java.lang.String sourcePath,
                            java.lang.String destinationPath,
                            java.lang.String sourceFilename,
                            java.lang.String destinationFilename)
                     throws java.io.IOException,
                            java.io.FileNotFoundException
Throws:
java.io.IOException
java.io.FileNotFoundException

woidOffset

static int woidOffset(java.nio.ByteBuffer bytes,
                      int offset)

getExtension

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

timeDisplay

public static java.lang.String timeDisplay(long time)

isExtendedASCII

public static boolean isExtendedASCII(char c)

replaceExtendedASCII

public static java.lang.String replaceExtendedASCII(java.lang.String oldString)

removeExtendedASCII

public static java.lang.String removeExtendedASCII(java.lang.String oldString)

convertExtendedASCII

private static boolean convertExtendedASCII(char c,
                                            java.lang.StringBuffer buf)

removeIllegalCharsFromFilename

public static java.lang.String removeIllegalCharsFromFilename(java.lang.String oldString)

removeIllegalCharsFromDirectory

public static java.lang.String removeIllegalCharsFromDirectory(java.lang.String oldString)

removeNulls

public static java.lang.String removeNulls(java.lang.String oldString)

fixGenre

public static java.lang.String fixGenre(java.lang.String oldGenre)

randomString

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

getFreeSpace

public static java.lang.String getFreeSpace()

deleteDir

public static boolean deleteDir(java.lang.String dir)
Returns:
tru if the directory was succesfully deleted

deleteDir

public static boolean deleteDir(java.io.File f)
Parameters:
f -
Returns:
tru if the directory was succesfully deleted


Copyright © 2004 NeurosDBM Dev Team All Rights Reserved.