org.indy.util
Class IndyUtilities

java.lang.Object
  |
  +--org.indy.util.IndyUtilities

public final class IndyUtilities
extends java.lang.Object

IdGlobal 27/11/01: OTG - Created from Delphi IdGlobal unit

Author:
owen

Field Summary
protected static java.lang.String m_datePattern
          Description of the Field
 
Constructor Summary
IndyUtilities()
           
 
Method Summary
static void buildMIMETypeMap()
           
static void commaSeperatedToCollection(java.util.Collection col, java.lang.String src)
          Description of the Method
static boolean copyFileTo(java.lang.String src, java.lang.String dest)
          Description of the Method
static java.lang.String dateToGMTOffsetString(java.util.Date date, boolean subGMT)
          Description of the Method
static java.lang.String dateToUnixString(java.util.Date d)
          Description of the Method
static java.lang.String fetch(java.lang.String input)
          Description of the Method
static java.lang.String fetch(java.lang.String input, boolean delete)
          Description of the Method
static java.lang.String fetch(java.lang.String input, java.lang.String delim)
          Description of the Method
static java.lang.String fetch(java.lang.String input, java.lang.String delim, boolean delete)
          Description of the Method
static long fileSizeByName(java.lang.String filename)
          Description of the Method
protected static int getCalendarField(java.lang.String val, java.lang.String pattern, int field)
          Parses a string based on a pattern and retrieves its numneric equivalent from the default Calendar instance
static int getDefaultMaxLineLength()
          DOCUMENT ME!
static int getDefaultTimeout()
          DOCUMENT ME!
static java.lang.String getIndyProperty(java.lang.String key)
          DOCUMENT ME!
static java.lang.String getIndyVersion()
          Gets the indyVersion attribute of the IdGlobal class
static java.lang.String getMIMETypeFromFile(java.lang.String filename)
          Gets the mIMETypeFromFile attribute of the IdGlobal class
static java.lang.String getProductName()
          Gets the productName attribute of the IdGlobal class
static java.lang.String getResourceString(java.lang.String key)
          Gets the resourceString attribute of the IdGlobal class
static java.lang.String includeTrailingBackSlash(java.lang.String path)
          Description of the Method
static java.util.Collection indyPorts()
          Description of the Method
static boolean isCurrentThread(java.lang.Thread t)
          Gets the currentThread attribute of the IdGlobal class
static boolean isIP(java.lang.String ip)
          Gets the iP attribute of the IdGlobal class
static void parseURI(java.lang.String URI, java.lang.String protocol, java.lang.String host, java.lang.String path, java.lang.String document, java.lang.String port)
          Description of the Method
static int posInStringArray(java.lang.String searchString, java.lang.String[] contents)
          Description of the Method
static int posInStringArray(java.lang.String searchString, java.lang.String[] contents, boolean caseSensitive)
          Description of the Method
static int ROL(int val, byte shift)
          Description of the Method
static int ROR(int val, byte shift)
          Description of the Method
static void sleep(long time)
          Description of the Method
static int strToDay(java.lang.String day)
          Description of the Method
static int strToMonth(java.lang.String month)
          Description of the Method
static java.util.Date unixDateStrToDate(java.lang.String date)
          Description of the Method
static java.lang.String upCaseFirst(java.lang.String s)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_datePattern

protected static final java.lang.String m_datePattern
Description of the Field
Constructor Detail

IndyUtilities

public IndyUtilities()
Method Detail

getIndyProperty

public static java.lang.String getIndyProperty(java.lang.String key)
DOCUMENT ME!
Parameters:
key - DOCUMENT ME!
Returns:
DOCUMENT ME!

getDefaultTimeout

public static int getDefaultTimeout()
DOCUMENT ME!
Returns:
DOCUMENT ME!

getDefaultMaxLineLength

public static int getDefaultMaxLineLength()
DOCUMENT ME!
Returns:
DOCUMENT ME!

getCalendarField

protected static int getCalendarField(java.lang.String val,
                                      java.lang.String pattern,
                                      int field)
                               throws DateParseException
Parses a string based on a pattern and retrieves its numneric equivalent from the default Calendar instance
Parameters:
val - Description of the Parameter
pattern - Description of the Parameter
field - Description of the Parameter
Returns:
The calendarField value
Throws:
DateParseException - Description of the Exception

getResourceString

public static java.lang.String getResourceString(java.lang.String key)
Gets the resourceString attribute of the IdGlobal class
Parameters:
key - Description of the Parameter
Returns:
The resourceString value

getProductName

public static java.lang.String getProductName()
Gets the productName attribute of the IdGlobal class
Returns:
The productName value

getIndyVersion

public static java.lang.String getIndyVersion()
Gets the indyVersion attribute of the IdGlobal class
Returns:
The indyVersion value

isIP

public static boolean isIP(java.lang.String ip)
Gets the iP attribute of the IdGlobal class
Parameters:
ip - Description of the Parameter
Returns:
The iP value

getMIMETypeFromFile

public static java.lang.String getMIMETypeFromFile(java.lang.String filename)
Gets the mIMETypeFromFile attribute of the IdGlobal class
Parameters:
filename - Description of the Parameter
Returns:
The mIMETypeFromFile value

isCurrentThread

public static boolean isCurrentThread(java.lang.Thread t)
Gets the currentThread attribute of the IdGlobal class
Parameters:
t - Description of the Parameter
Returns:
The currentThread value

includeTrailingBackSlash

public static java.lang.String includeTrailingBackSlash(java.lang.String path)
Description of the Method
Parameters:
path - Description of the Parameter
Returns:
Description of the Return Value

buildMIMETypeMap

public static void buildMIMETypeMap()

commaSeperatedToCollection

public static void commaSeperatedToCollection(java.util.Collection col,
                                              java.lang.String src)
Description of the Method
Parameters:
col - Description of the Parameter
src - Description of the Parameter

copyFileTo

public static boolean copyFileTo(java.lang.String src,
                                 java.lang.String dest)
                          throws IndyIOException
Description of the Method
Parameters:
src - Description of the Parameter
dest - Description of the Parameter
Returns:
Description of the Return Value
Throws:
IdIOException - Description of the Exception

dateToGMTOffsetString

public static java.lang.String dateToGMTOffsetString(java.util.Date date,
                                                     boolean subGMT)
Description of the Method
Parameters:
date - Description of the Parameter
subGMT - Description of the Parameter
Returns:
Description of the Return Value

dateToUnixString

public static java.lang.String dateToUnixString(java.util.Date d)
Description of the Method
Parameters:
d - Description of the Parameter
Returns:
Description of the Return Value

fetch

public static java.lang.String fetch(java.lang.String input,
                                     java.lang.String delim,
                                     boolean delete)
Description of the Method
Parameters:
input - Description of the Parameter
delim - Description of the Parameter
delete - Description of the Parameter
Returns:
Description of the Return Value

fetch

public static java.lang.String fetch(java.lang.String input,
                                     boolean delete)
Description of the Method
Parameters:
input - Description of the Parameter
delete - Description of the Parameter
Returns:
Description of the Return Value

fetch

public static java.lang.String fetch(java.lang.String input,
                                     java.lang.String delim)
Description of the Method
Parameters:
input - Description of the Parameter
delim - Description of the Parameter
Returns:
Description of the Return Value

fetch

public static java.lang.String fetch(java.lang.String input)
Description of the Method
Parameters:
input - Description of the Parameter
Returns:
Description of the Return Value

fileSizeByName

public static long fileSizeByName(java.lang.String filename)
Description of the Method
Parameters:
filename - Description of the Parameter
Returns:
Description of the Return Value

indyPorts

public static java.util.Collection indyPorts()
Description of the Method
Returns:
Description of the Return Value

parseURI

public static void parseURI(java.lang.String URI,
                            java.lang.String protocol,
                            java.lang.String host,
                            java.lang.String path,
                            java.lang.String document,
                            java.lang.String port)
Description of the Method
Parameters:
URI - Description of the Parameter
protocol - Description of the Parameter
host - Description of the Parameter
path - Description of the Parameter
document - Description of the Parameter
port - Description of the Parameter

posInStringArray

public static int posInStringArray(java.lang.String searchString,
                                   java.lang.String[] contents,
                                   boolean caseSensitive)
Description of the Method
Parameters:
searchString - Description of the Parameter
contents - Description of the Parameter
caseSensitive - Description of the Parameter
Returns:
Description of the Return Value

posInStringArray

public static int posInStringArray(java.lang.String searchString,
                                   java.lang.String[] contents)
Description of the Method
Parameters:
searchString - Description of the Parameter
contents - Description of the Parameter
Returns:
Description of the Return Value

ROL

public static int ROL(int val,
                      byte shift)
Description of the Method
Parameters:
val - Description of the Parameter
shift - Description of the Parameter
Returns:
Description of the Return Value

ROR

public static int ROR(int val,
                      byte shift)
Description of the Method
Parameters:
val - Description of the Parameter
shift - Description of the Parameter
Returns:
Description of the Return Value

sleep

public static void sleep(long time)
Description of the Method
Parameters:
time - Description of the Parameter

strToDay

public static int strToDay(java.lang.String day)
                    throws DateParseException
Description of the Method
Parameters:
day - Description of the Parameter
Returns:
Description of the Return Value
Throws:
DateParseException - Description of the Exception

strToMonth

public static int strToMonth(java.lang.String month)
                      throws DateParseException
Description of the Method
Parameters:
month - Description of the Parameter
Returns:
Description of the Return Value
Throws:
DateParseException - Description of the Exception

upCaseFirst

public static java.lang.String upCaseFirst(java.lang.String s)
Description of the Method
Parameters:
s - Description of the Parameter
Returns:
Description of the Return Value

unixDateStrToDate

public static java.util.Date unixDateStrToDate(java.lang.String date)
                                        throws DateParseException
Description of the Method
Parameters:
date - Description of the Parameter
Returns:
Description of the Return Value
Throws:
DateParseException - Description of the Exception


Copyright © 2002-2002 IndyJ. All Rights Reserved.