Java Code Examples for org.apache.http.util.VersionInfo

Following code examples demonstrate how to use org.apache.http.util.VersionInfofrom android. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.apache.http.util.VersionInfoand various code implementation of this class.

	public void testVersion() {
		VersionInfo[] versionInfos = VersionInfo.loadVersionInfo(new String[] {
				"org.apache.http", "org.apache.http.client" }, this.getClass()
		if (null != versionInfos && 0 != versionInfos.length) {
			for (VersionInfo versionInfo : versionInfos) {
				Log.v(TAG, "VersionInfo: " + versionInfo);


	public void testVersion(){
		VersionInfo vi = VersionInfo.loadVersionInfo("org.apache.http.client",getClass().getClassLoader());  
		String version = vi.getRelease();  
		Log.d("apache http client version", version);

Provides access to version information for HTTP components. Instances of this class provide version

information for a single module or informal unit, as explained here. Static methods are used to extract version information from property files that are automatically packaged with HTTP component release JARs.
All available version information is provided in strings, where the string format is informal and subject to change without notice. Version information is provided for debugging output and interpretation by humans, not for automated processing in applications. @author Oleg Kalnichevski @author and others @deprecated Please use instead. Please visit this webpage for further details.

Read More