Package uk.ac.bristol.star.cdf.util
Class CdfDump
- java.lang.Object
-
- uk.ac.bristol.star.cdf.util.CdfDump
-
public class CdfDump extends java.lang.ObjectUtility to dump the records of a CDF file, optionally with field values. Intended to be used fro the command line via themainmethod. The function is roughly comparable to thecdfirsdumpcommand in the CDF distribution.The output can optionally be written in HTML format. The point of this is so that field values which represent pointers to records can be displayed as hyperlinks, which makes it very easy to chase pointers around the CDF file in a web browser.
- Since:
- 21 Jun 2013
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)Main method.voidrun()Does the work, writing output.static intrunMain(java.lang.String[] args)Does the work for the command line tool, handling arguments.
-
-
-
Constructor Detail
-
CdfDump
public CdfDump(CdfReader crdr, java.io.PrintStream out, boolean writeFields, boolean html)
Constructor.- Parameters:
crdr- CDF readerout- output stream for listingwriteFields- true to write field data as well as record IDshtml- true to write output in HTML format
-
-
Method Detail
-
run
public void run() throws java.io.IOExceptionDoes the work, writing output.- Throws:
java.io.IOException
-
runMain
public static int runMain(java.lang.String[] args) throws java.io.IOExceptionDoes the work for the command line tool, handling arguments. Sucess is indicated by the return value.- Parameters:
args- command-line arguments- Returns:
- 0 for success, non-zero for failure
- Throws:
java.io.IOException
-
main
public static void main(java.lang.String[] args) throws java.io.IOExceptionMain method. Use -help for arguments.- Throws:
java.io.IOException
-
-