|
|||||||||||
| 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(String filename)
Class constructor that takes a filename to make replacements on. |
|
ASCIIFileUpdate(String filename,
String[] matches,
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(String search,
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(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(String filename)
throws Exception
filename - The file that will be altered
Exception - If there is an error processing the file
public ASCIIFileUpdate(String filename,
String[] matches,
String[] replace)
throws 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
Exception - If there is an error processing the file| Method Detail |
|---|
public void setMode(int mode)
mode - LINE_MODE or TEXT_MODE; the default is LINE_MODE
public void addPattern(String search,
String replace)
search - A regexp to search forreplace - A replacement for the corresponding search
public void alterFile()
throws Exception
Exception - if an error is encountered when reading or writing to the
filepublic static int simpleModify(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 | ||||||||||