[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Thu Feb 28 16:58:56 UTC 2008


kawas
Thu Feb 28 11:58:56 EST 2008
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory dev.open-bio.org:/tmp/cvs-serv22369/Java/src/main/org/biomoby/client

Modified Files:
	CentralImpl.java 
Log Message:
removing getResource(URL) and moving it to org.biomoby.shared.Utils
moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.52,1.53
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java	2008/02/28 16:27:57	1.52
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java	2008/02/28 16:58:56	1.53
@@ -1820,35 +1820,7 @@
 	throw new MobyException ("No resource found for '" + resourceName + "'.");
     }
 
-    /***************************************************************************
-     * Gets an InputStream on a URL 
-     ***************************************************************************/
-    public InputStream getResource(URL url) throws MobyException {
-	if (url == null)
-	    throw new MobyException("Can't get RESOURCE from a null URL!");
-	try {
-	    HttpURLConnection urlConnection = null;
-	    urlConnection = (HttpURLConnection) url.openConnection();
-	    urlConnection
-		    .setRequestProperty("User-Agent", "jmoby-central/1.0");
-	    urlConnection
-		    .setRequestProperty("Accept-Encoding", "gzip, deflate");
-	    urlConnection.setDefaultUseCaches(false);
-	    urlConnection.setUseCaches(false);
-
-	    if (("gzip").equalsIgnoreCase(urlConnection.getContentEncoding())) {
-		// handle gzip encoded content
-		return new GZIPInputStream(urlConnection.getInputStream());
-	    } else {
-		return urlConnection.getInputStream();
-	    }
-	    
-	} catch (IOException e) {
-	    throw new MobyException("Error creating input stream:", e
-		    .getCause());
-	}
-    }
-    /**************************************************************************
+   /**************************************************************************
      * Return a case-insensitive comparator of Strings. It is used to
      * create various TreeMaps where keys are strings.
      *************************************************************************/




More information about the MOBY-guts mailing list