|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.UpdateInstaller.ASCIIFileUpdate
public class ASCIIFileUpdate
Allows modification of ASCII files. This class is intended to provide the functionality of the update ASCII file modifications in ISMP 11.5 for the update installer.
Constructor Summary | |
---|---|
ASCIIFileUpdate(java.lang.String filename)
Class constructor that takes a filename to make replacements on. |
|
ASCIIFileUpdate(java.lang.String filename,
java.lang.String[] matches,
java.lang.String[] replace)
Class constructor that takes a filename to make replacements on, an array of matches, and an array of replacements. |
Method Summary | |
---|---|
void |
addPattern(java.lang.String search,
java.lang.String replace)
Adds a search and replace term to the array of items to search for |
void |
alterFile()
Performs the actual alteration of the file. |
void |
setMode(int mode)
Sets the mode for this replacement. |
static int |
simpleModify(java.lang.String[] args)
Performs a modification to a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ASCIIFileUpdate(java.lang.String filename) throws java.lang.Exception
filename
- The file that will be altered
java.lang.Exception
- If there is an error processing the filepublic ASCIIFileUpdate(java.lang.String filename, java.lang.String[] matches, java.lang.String[] replace) throws java.lang.Exception
filename
- The file that will be alteredmatches
- An array of regular expressions to search forreplace
- A parallel array to matches which represents the replacements
java.lang.Exception
- If there is an error processing the fileMethod Detail |
---|
public void setMode(int mode)
mode
- LINE_MODE or TEXT_MODE; the default is LINE_MODEpublic void addPattern(java.lang.String search, java.lang.String replace)
search
- A regexp to search forreplace
- A replacement for the corresponding searchpublic void alterFile() throws java.lang.Exception
java.lang.Exception
- if an error is encountered when reading or writing to the
filepublic static int simpleModify(java.lang.String[] args)
args
- An array of arguments for this modification: file search
replacement [LINE|TEXT]
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |