|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.util.OpenURL
public class OpenURL
Application for opening the given URL and redirecting the contents to some output device (such as the console or file).
Usage:java com.sas.servlet.util.OpenURL <url> [-o<filename>] [-r<search>=<replace>]
url = The URL to open
filename = The optional output file name
search=replace = An optional search and replace parameter. Multiple search and replace parameters can be specified. If an '=' sign must be used in the search and/or replace string it must be escaped with '\='. Searches are case- sensitive. A quote (") can be represented by double single quotes ('')
Constructor Summary | |
---|---|
OpenURL()
|
Method Summary | |
---|---|
protected int |
findString(java.lang.String s,
java.lang.String p,
java.lang.String escPrefix)
Finds the given pattern in the given string. |
protected java.lang.String |
getArg(java.lang.String[] args,
java.lang.String sw)
Returns the argument with the given leading switch. |
static void |
main(java.lang.String[] args)
Main entry point |
void |
open(java.lang.String[] args)
Open the URL and send to the output device |
protected java.lang.String |
searchAndReplace(java.lang.String s,
java.lang.String search,
java.lang.String replace)
Searches and replaces. |
Constructor Detail |
---|
public OpenURL()
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- The program argumentspublic void open(java.lang.String[] args) throws java.lang.Exception
args
- The program arguments
java.lang.Exception
- If some exception occursprotected java.lang.String getArg(java.lang.String[] args, java.lang.String sw)
args
- The program argumentsswitch
- The switch to search for
protected int findString(java.lang.String s, java.lang.String p, java.lang.String escPrefix)
protected java.lang.String searchAndReplace(java.lang.String s, java.lang.String search, java.lang.String replace)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |