Package uk.ac.starlink.ttools.votlint
Class VersionDetector
java.lang.Object
uk.ac.starlink.ttools.votlint.VersionDetector
Determines the version of a VOTable document.
- Since:
- 20 Nov 2012
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Determines the reported version of a VOTable document contained in an input stream.static void
Prints out the version number of a VOTable file presented on standard input.
-
Constructor Details
-
VersionDetector
public VersionDetector()
-
-
Method Details
-
getVersionString
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:
IOException
-
main
Prints out the version number of a VOTable file presented on standard input.- Throws:
IOException
-