|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.javatest.EditLinks
public class EditLinks
A utility to rewrite links within a set of HTML files.
| Nested Class Summary | |
|---|---|
static class |
EditLinks.BadArgs
An exception to report bad command line arguments. |
| Constructor Summary | |
|---|---|
EditLinks()
Create an empty editor object. |
|
EditLinks(java.lang.String[] args)
Create an editor object based on command line args. |
|
| Method Summary | |
|---|---|
void |
addEdit(java.lang.String oldPrefix,
java.lang.String newPrefix)
Add another edit to be applied when the files are edited. |
void |
edit(java.io.File[] src,
java.io.File dest)
Edit the given files, using the current set of edits and ignores. |
void |
edit(java.io.File src,
java.io.File dest)
Edit the given file, using the current set of edits and ignores. |
void |
ignore(java.lang.String file)
Add another file to be ignored when the files are edited. |
static void |
main(java.lang.String[] args)
Command line entry point. Usage: |
void |
run()
Edit the files set up by the EditLinks(String[]) constructor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EditLinks()
public EditLinks(java.lang.String[] args)
throws EditLinks.BadArgs
args - Command line args.
EditLinks.BadArgs - if problems are found in the given arguments.main(java.lang.String[])| Method Detail |
|---|
public static void main(java.lang.String[] args)
java com.sun.javatest.EditLinks options files...
Arguments:
args - Command line arguments, per the usage as described.
public void addEdit(java.lang.String oldPrefix,
java.lang.String newPrefix)
oldPrefix - The prefix of HTML references to be updated.newPrefix - The replacement value for occurrences of oldPrefix.public void ignore(java.lang.String file)
file - The name of a file to be ignored when editing.
public void run()
throws java.io.IOException
EditLinks(String[]) constructor.
java.io.IOException - if any errors occur while editing the specified files.
public void edit(java.io.File[] src,
java.io.File dest)
throws java.io.IOException
src - An array of files or directories of files to be edited.dest - A destination file for the edit.
java.io.IOException - if any problems occur while editing the specified
files.
java.lang.IllegalArgumentException - if the destination is a single file
but the source file is not.edit(File, File)
public void edit(java.io.File src,
java.io.File dest)
throws java.io.IOException
src - A file or directory of files to be edited.dest - A destination file for the edit.
java.io.IOException - if any problems occur while editing the specified
files.
java.lang.IllegalArgumentException - if the destination is a single file
but the source file is not.edit(File, File)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||