|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ccg.util.Convert
com.ccg.util.TagLookup
com.ccg.util.CommandLineUtility
com.ccg.net.URLCat
com.ccg.net.SerializedCat
public class SerializedCat
Command line utility read serialized Java objects retrieved.
This utility is useful to allow one to useful for determining information about a serialized data feed (or file).
It displays minimal information about each object read including:
Invoke via:
java com.ccg.net.SerializedCat [-url URL|-in SRC] [-copy FILE]
[-useCache [true|false]] [-flush [true|false]]
URLCat. In addition to the
standard file and URL's, you can also specify the
"tcp://HOST:PORT/" URL for a direct TCP link to a serialized object
server (the URLConnection class is loaded
to provide this functionality). If you omit this argument, data
will be read from the standard input.getInputStream() method used. In addition to the standard file and
URL's, you can also specify the "tcp://HOST:PORT/" URL for a direct
TCP link to a serialized object server (the URLConnection class is loaded to provide this
functionality). If you omit this argument, data will be read from
the standard input.method we use to
create the destination (typically you'll just specify a file
name).CommandLineUtility class. They are not
documented here as they may expand with time. The "-args URL" may
be of particular interest as it allows one to load the command line
arguments from a file/URL.Quick example, suppose I have a TCP based service that writes out serialized Java object at port 12002 on the host 'kenny'. I could use the following to see what types of objects were being sent (and make a copy in log file called: "log.sobj"):
java com.ccg.net.SerializedCat -in tcp://kenny:12002/ \ -copy log.sobj
After running the above, you can re-run it against the log file created via (note, your log file may not have been closed out properly):
java com.ccg.net.SerializedCat -in log.sobj
| Constructor Summary | |
|---|---|
SerializedCat(String[] args)
Constructs the object with a set of command line arguments. |
|
| Method Summary | |
|---|---|
static void |
main(String[] args)
Main entry point into the application. |
void |
run()
Does the actual reading and processing of the information. |
| Methods inherited from class com.ccg.net.URLCat |
|---|
getURLInputStream, getUseCaches, isFlushEnabled, isHexDump, setFlushEnabled, setHexDump, setUseCaches |
| Methods inherited from class com.ccg.util.CommandLineUtility |
|---|
getFiles, getInputStream, getLineNumberReader, getOutputStream, getPrintWriter, getStrings, setInputStream, setOutputStream |
| Methods inherited from class com.ccg.util.TagLookup |
|---|
get, getBoolean, getChoice, getColor, getDate, getDate, getFont, getIndexedList, getInputStream, getLocale, getLookup, getNumber, getNumber, getOutputStream, getString, getString, getStrings, getTag, getTimeSpan, getTimeSpan, setLookup, setTag |
| Methods inherited from class com.ccg.util.Convert |
|---|
choiceValue, getDateFormat, getNumberFormat, setDateFormat, setNumberFormat, toBoolean, toColor, toDate, toFont, toInputStream, toLocale, toNumber, toOutputStream, toString, toTimeSpan |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SerializedCat(String[] args)
This method constructs a new SerializedCat object and
initializes with a array of string values which are treated as
command line arguments. The command line arguments are processed
(as specified in the class overview and parent class).
args - Array of command line arguments.| Method Detail |
|---|
public void run()
This method is responsible for the actual reading and
processing of the serialized objects from the specified source as
described in the class overview.
run in interface Runnablerun in class URLCatpublic static void main(String[] args)
Simply constructs the object and passes control to the run() method.
args - Array of command line arguments.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||