Author: slotia
Date: 2009-04-02 08:24:53 -0700 (Thu, 02 Apr 2009)
New Revision: 16431

Modified:
   
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/read/AbstractNetworkReader.java
Log:
Changed AbstractNetworkReader so that it can cancel.


Modified: 
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/read/AbstractNetworkReader.java
===================================================================
--- 
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/read/AbstractNetworkReader.java
 2009-04-02 15:21:40 UTC (rev 16430)
+++ 
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/read/AbstractNetworkReader.java
 2009-04-02 15:24:53 UTC (rev 16431)
@@ -1,6 +1,7 @@
 package org.cytoscape.io.internal.read;
 
 import java.io.InputStream;
+import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -13,6 +14,7 @@
 
        protected static final String NODE_NAME_ATTR_LABEL = "name";
 
+       protected boolean cancel = false;
        protected InputStream inputStream;
        protected CyNetworkFactory cyNetworkFactory;
        protected CyNetworkViewFactory cyNetworkViewFactory;
@@ -42,4 +44,14 @@
                        throw new NullPointerException("Input stream is null");
                inputStream = is;
        }
+
+       public void cancel()
+       {
+               cancel = true;
+               try
+               {
+                       inputStream.close();
+               }
+               catch (IOException e) {}
+       }
 }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to