public class ProcessHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONDITION |
static String |
END_PATTERN |
static String |
EQUALS |
static String |
NOT_EQUALS |
static String |
START_PATTERN |
| Constructor and Description |
|---|
ProcessHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendFile(String fileContents,
File toFile)
This method is to append the given contents into a file.
|
static void |
copyBinaryFile(URL source,
File dest)
This method reads contents from source, and writes the contents into
destination file.
|
static Set<String> |
getReplaceKeys(String str)
This method returns a vector of all replace marker strings.
|
static Set<String> |
getReplaceKeys(String str,
String startPattern,
String endPattern)
This method returns a vector of all replace marker strings.
|
static String |
getReplaceMarker(String macro) |
static String |
getValueAfterExpandingMacros(String string,
Set<String> macros,
Map<String,String> valueStore) |
static String |
getValueAfterExpandingMacros(String string,
Set<String> macros,
Map<String,String> valueStore,
String startPattern,
String endPattern) |
static void |
mkdirs(org.eclipse.core.resources.IProject projectHandle,
org.eclipse.core.resources.IFolder parentFolder)
This method creates the directories in the parent folder.
|
static String |
readFromFile(URL source)
This method takes a URL as parameter to read the contents, and to add
into a string buffer.
|
public static final String CONDITION
public static final String START_PATTERN
public static final String END_PATTERN
public static final String EQUALS
public static final String NOT_EQUALS
public static void appendFile(String fileContents, File toFile) throws IOException
fileContents - contents which are appended to the file.toFile - a file to append contents.IOException - exception while writing contents into a filepublic static Set<String> getReplaceKeys(String str)
str - A given string possibly containing markers.public static Set<String> getReplaceKeys(String str, String startPattern, String endPattern)
str - A given string possibly containing markers.startPattern - token to start macro replacementendPattern - token to end macro replacementpublic static String readFromFile(URL source) throws IOException
source - URL to read the contents.IOExceptionpublic static void copyBinaryFile(URL source, File dest) throws IOException
source - URL to read the contents.dest - destination file to write the contents.IOExceptionpublic static void mkdirs(org.eclipse.core.resources.IProject projectHandle,
org.eclipse.core.resources.IFolder parentFolder)
throws org.eclipse.core.runtime.CoreException
projectHandle - parentFolder - org.eclipse.core.runtime.CoreExceptionpublic static String getValueAfterExpandingMacros(String string, Set<String> macros, Map<String,String> valueStore)
string - macros - valueStore - public static String getValueAfterExpandingMacros(String string, Set<String> macros, Map<String,String> valueStore, String startPattern, String endPattern)
string - macros - valueStore - Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.