com.aelitis.azureus.core.util
Class GeneralUtils
java.lang.Object
  
com.aelitis.azureus.core.util.GeneralUtils
public class GeneralUtils
- extends Object
 
 
| 
Method Summary | 
static ProcessBuilder | 
createProcessBuilder(File workingDir,
                     String[] cmd,
                     String[] extra_env)
 
            | 
static MovingImmediateAverage | 
getSmoothAverage()
 
            | 
static int | 
getSmoothUpdateInterval()
 
            | 
static int | 
getSmoothUpdateWindow()
 
            | 
static String | 
replaceAll(String str,
           String[] from_strs,
           String[] to_strs)
 
          as above but does safe replacement of multiple strings (i.e. | 
static String | 
replaceAll(String str,
           String from_str,
           String replacement)
 
          string.replaceAll does \\ and $ expansion in replacement, this doesn't, in fact it
 doesn't do any pattern matching at all, it is a literal replacement | 
static String[] | 
splitQuotedTokens(String str)
 
          splits space separated tokens respecting quotes (either " or ' ) | 
static String | 
stringJoin(Collection list,
           String delim)
 
            | 
static String | 
stripOutHyperlinks(String message)
 
            | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
GeneralUtils
public GeneralUtils()
replaceAll
public static String replaceAll(String str,
                                String from_str,
                                String replacement)
- string.replaceAll does \\ and $ expansion in replacement, this doesn't, in fact it
 doesn't do any pattern matching at all, it is a literal replacement
- Parameters:
 str - from_str - = NOTE, no regex supportreplacement - 
- Returns:
 
 
 
replaceAll
public static String replaceAll(String str,
                                String[] from_strs,
                                String[] to_strs)
- as above but does safe replacement of multiple strings (i.e. a match in the replacement
 of one string won't be substituted by another)
- Parameters:
 str - from_strs - to_strs - 
- Returns:
 
 
 
stripOutHyperlinks
public static String stripOutHyperlinks(String message)
 
splitQuotedTokens
public static String[] splitQuotedTokens(String str)
- splits space separated tokens respecting quotes (either " or ' )
- Parameters:
 str - 
- Returns:
 
 
 
createProcessBuilder
public static ProcessBuilder createProcessBuilder(File workingDir,
                                                  String[] cmd,
                                                  String[] extra_env)
                                           throws IOException
- Throws:
 IOException
 
getSmoothUpdateWindow
public static int getSmoothUpdateWindow()
 
getSmoothUpdateInterval
public static int getSmoothUpdateInterval()
 
getSmoothAverage
public static MovingImmediateAverage getSmoothAverage()
 
stringJoin
public static String stringJoin(Collection list,
                                String delim)