Class VersionDetector

java.lang.Object
uk.ac.starlink.ttools.votlint.VersionDetector

public class VersionDetector extends Object
Determines the version of a VOTable document.
Since:
20 Nov 2012
Author:
Mark Taylor
  • Constructor Details

    • VersionDetector

      public VersionDetector()
  • Method Details

    • getVersionString

      public static String getVersionString(BufferedInputStream in) throws 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:
      IOException
    • main

      public static void main(String[] args) throws IOException
      Prints out the version number of a VOTable file presented on standard input.
      Throws:
      IOException