Package uk.ac.starlink.ttools.votlint
Class VersionDetector
- java.lang.Object
-
- uk.ac.starlink.ttools.votlint.VersionDetector
-
public class VersionDetector extends java.lang.Object
Determines the version of a VOTable document.- Since:
- 20 Nov 2012
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description VersionDetector()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getVersionString(java.io.BufferedInputStream in)
Determines the reported version of a VOTable document contained in an input stream.static void
main(java.lang.String[] args)
Prints out the version number of a VOTable file presented on standard input.
-
-
-
Method Detail
-
getVersionString
public static java.lang.String getVersionString(java.io.BufferedInputStream in) throws java.io.IOException
Determines the reported version of a VOTable document contained in an input stream. The attributes on the first encountered VOTABLE start tag are used. A "version" attribute is used if available, otherwise the namespacing attributes are trawled. Mark/reset is used; whether a version string is identified or not, the stream is reset to the starting position on exit.- Parameters:
in
- input stream- Returns:
- declared version string, or null if none can be found
- Throws:
java.io.IOException
-
main
public static void main(java.lang.String[] args) throws java.io.IOException
Prints out the version number of a VOTable file presented on standard input.- Throws:
java.io.IOException
-
-