public class XdocUtils extends Object
xmlns:XdocUtils="xalan://uk.ac.starlink.xdoc.XdocUtils"
to the xsl:stylesheet element of an XSLT stylesheet.
Other processors probably have their own mechanisms.| Modifier and Type | Method and Description |
|---|---|
static String |
classUsage(String clazzName)
Returns the usage string for a given class.
|
static Dimension |
getImageSize(String fname)
Returns the dimensions of an image file with the given filename.
|
static String |
reportFileSize(String loc)
Returns the approximate size of a file in human-readable form
given the location of a file.
|
public static String classUsage(String clazzName) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException
main(String[]) method of the
named class with the single argument "-help",
and captures and returns the output.clazzName - fully qualified name of class having main() methodClassNotFoundExceptionNoSuchMethodExceptionIllegalAccessExceptionInvocationTargetExceptionpublic static String reportFileSize(String loc)
loc - file locationpublic static Dimension getImageSize(String fname) throws IOException
fname - filename of image filenew Dimension(-1,-1)IOExceptionCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.