Gets the current version from user-agent-string.info

@return
@throws IOException
762481
protected String getVersionFromServer() throws IOException {
		URL url = new URL(VERSION_CHECK_URL);
		InputStream is = url.openStream();
		try {
			byte[] buff = new byte[4048];
			int len = is.read(buff);
			return new String(buff, 0, len);
		} finally {
			is.close();
		}
	}
1182043
public long version() {
    return Long.valueOf(file.getName().substring(file.getName().lastIndexOf(PART_SEPARATOR) + 1, file.getName().lastIndexOf(EXTENSION_SEPARATOR)));
  }
1115014
protected String getCurrentReleaseVersion() {
        HttpURLConnection conn = null;
        try {
            final String str = settings.getString(Settings.KEYS.ENGINE_VERSION_CHECK_URL, "http://jeremylong.github.io/DependencyCheck/current.txt");
            final URL url = new URL(str);
            final URLConnectionFactory factory = new URLConnectionFactory(settings);
            conn = factory.createHttpURLConnection(url);
            conn.connect();
            if (conn.getResponseCode() != 200) {
                return null;
            }
            final String releaseVersion = IOUtils.toString(conn.getInputStream(), StandardCharsets.UTF_8);
            if (releaseVersion != null) {
                return releaseVersion.trim();
            }
        } catch (MalformedURLException ex) {
            LOGGER.debug("Unable to retrieve current release version of dependency-check - malformed url?");
        } catch (URLConnectionFailureException ex) {
            LOGGER.debug("Unable to retrieve current release version of dependency-check - connection failed");
        } catch (IOException ex) {
            LOGGER.debug("Unable to retrieve current release version of dependency-check - i/o exception");
        } finally {
            if (conn != null) {
                conn.disconnect();
            }
        }
        return null;
    }
28648
public static String getBuildVersion(){
    return VersionInfo.getVersion() + 
    " from " + VersionInfo.getRevision() +
    " by " + VersionInfo.getUser() + 
    " on " + VersionInfo.getDate();
  }
619418
protected String formatVersionInfo() {
    Formatter formatter = new Formatter();
    formatter.format("TraceLogger[%s]: Version = %s.", this.name, VERSION);

    return formatter.toString();
  }
414847
@Override
	public Object getCurrentVersion(Serializable id, SharedSessionContractImplementor session) throws HibernateException {

		if ( log.isTraceEnabled() ) {
			log.trace( "Getting version: " + MessageHelper.infoString( this, id, getFactory() ) );
		}
		final Tuple resultset = getFreshTuple( EntityKeyBuilder.fromPersister( this, id, session ), session );

		if ( resultset == null ) {
			return null;
		}
		else {
			return gridVersionType.nullSafeGet( resultset, getVersionColumnName(), session, null );
		}
	}
41940
public final Version version() {
        return new Version(bundle.getVersion().getMajor(), bundle.getVersion().getMinor(),
                bundle.getVersion().getMicro(), null, null, null);
    }
363395
public static String getRuntimeVersion() throws IOException {
        String classLoc = ClasspathUtil.locate(MdwVersion.class.getName());
        int dotJarBang = classLoc.lastIndexOf(".jar!");
        if (dotJarBang > 0) {
            String jarFilePath = classLoc.substring(0, dotJarBang + 4);
            if (jarFilePath.startsWith("file:/"))
                jarFilePath = jarFilePath.substring(6);
            if (!jarFilePath.startsWith("/"))
                jarFilePath = "/" + jarFilePath;
            try (JarFile jarFile = new JarFile(new File(jarFilePath))) {
                Manifest manifest = jarFile.getManifest();
                String version = manifest.getMainAttributes().getValue("MDW-Version");
                String buildTimestamp = manifest.getMainAttributes().getValue("MDW-Build");
                return version + " " + buildTimestamp;
            }
        }
        return null;
    }
772453
public java.lang.String getVersion() {
    java.lang.Object ref = version_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (bs.isValidUtf8()) {
        version_ = s;
      }
      return s;
    }
  }
1018227
public VersionInfo toInfo() {
        return new VersionInfo(
                parseDate(date),
                display,
                full,
                branch,
                build,
                commit,
                source,
                sourceType
        );
    }
644775
private String getPackageVersion(String packageInfoString) {
        // packageInfoString for example - audit-libs-2.7.6-3.el7-x86_64
        try {
            String firstDotString = packageInfoString.substring(0, packageInfoString.indexOf(Constants.DOT));
            int lastIndexOfHyphen = firstDotString.lastIndexOf(Constants.DASH);
            int lastIndexOfDot = packageInfoString.lastIndexOf(Constants.DOT);
            String packVersion = packageInfoString.substring(lastIndexOfHyphen + 1, lastIndexOfDot);
            if (StringUtils.isNotBlank(packVersion)) {
                return packVersion;
            }
        } catch (Exception e) {
            logger.warn("Failed to create package version : {}", e.getMessage());
        }
        return null;
    }
1334622
public List<Long> getAllVersions() throws IOException {
        List<Long> ret = new ArrayList<>();
        for (String s : listDir(_root)) {
            if (s.endsWith(FINISHED_VERSION_SUFFIX)) {
                ret.add(validateAndGetVersion(s));
            }
        }
        Collections.sort(ret);
        Collections.reverse(ret);
        return ret;
    }
759205
public static int getVersion(URI editsURI) throws IOException {
    if (editsURI.getScheme().equals(NNStorage.LOCAL_URI_SCHEME)) {
      StorageDirectory sd = new NNStorage(new StorageInfo()).new StorageDirectory(
          new File(editsURI.getPath()));
      File versionFile = sd.getVersionFile();
      if (!versionFile.exists()) {
        throw new IOException("No VERSION file in: " + editsURI + "version file: " + versionFile );
      }
      Properties props = Storage.getProps(versionFile);
      String layout = props.getProperty(Storage.LAYOUT_VERSION);
      if (layout == null) {
        throw new IOException("No layout version in: " + editsURI);
      }
      return Integer.valueOf(layout);
    } else {
      throw new IOException("Non file journals not supported yet.");
    }
  }
358770
def getVersion(self, agent, word):
        
        version_markers = self.version_markers if \
            isinstance(self.version_markers[0], (list, tuple)) else [self.version_markers]
        version_part = agent.split(word, 1)[-1]
        for start, end in version_markers:
            if version_part.startswith(start) and end in version_part:
                version = version_part[1:]
                if end:  # end could be empty string
                    version = version.split(end)[0]
                if not self.allow_space_in_version:
                    version = version.split()[0]
                return version
225077
public static String getVersionInfo() {
        String info = versionInfo.get();
        if (info == null) {
            info = String.format(Locale.ENGLISH, VERSION_INFO, getLibInfo(), getSysInfo());

            versionInfo.compareAndSet(null, info);
        }

        return info;
    }
1057354
public static String getVersion() {
        String version = null;

        // try to load from maven properties first
        try {
            Properties p = new Properties();
            InputStream is = VersionHelper.class.getResourceAsStream("/META-INF/maven/io.redlink/redlink-sdk-java/pom.properties");
            if (is != null) {
                p.load(is);
                version = p.getProperty("version", "");
            }
        } catch (Exception e) {
            // ignore
        }

        // fallback to using Java API
        if (version == null) {
            Package aPackage = VersionHelper.class.getPackage();
            if (aPackage != null) {
                version = aPackage.getImplementationVersion();
                if (version == null) {
                    version = aPackage.getSpecificationVersion();
                }
            }
        }

        // fallback to read pom.xml on testing
        if (version == null) {
            final MavenXpp3Reader reader = new MavenXpp3Reader();
            try {
                Model model = reader.read(new FileReader(new File("pom.xml")));
                version = model.getVersion();
            } catch (IOException | XmlPullParserException e) {
                // ignore
            }
        }

        return version;
    }
1364114
public DockerVersionInfo getVersionInfo() {
        String json = getServiceEndPoint()
                .path("/version")
                .request(MediaType.APPLICATION_JSON_TYPE)
                .get(String.class);

        return toObject(json, DockerVersionInfo.class);
    }