Author: pwang
Date: 2011-06-22 17:20:35 -0700 (Wed, 22 Jun 2011)
New Revision: 25890

Modified:
   
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/reader/NetworkTableReader.java
Log:
Use inputStream instead of URL

Modified: 
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/reader/NetworkTableReader.java
===================================================================
--- 
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/reader/NetworkTableReader.java
       2011-06-23 00:20:19 UTC (rev 25889)
+++ 
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/reader/NetworkTableReader.java
       2011-06-23 00:20:35 UTC (rev 25890)
@@ -71,12 +71,13 @@
 public class NetworkTableReader extends AbstractGraphReader implements 
TextTableReader {
        protected static final String COMMENT_CHAR = "!";
        protected final NetworkTableMappingParameters nmp;
-       protected final URL sourceURL;
+       //protected final URL sourceURL;
        protected final NetworkLineParser parser;
        protected final List<Long> nodeList;
        protected final List<Long> edgeList;
        protected final int startLineNumber;
        protected final String commentChar;
+       protected final InputStream is;
 
        protected CyNetwork network;
        
@@ -91,11 +92,12 @@
         * @param startLineNumber  DOCUMENT ME!
         * @param commentChar  DOCUMENT ME!
         */
-       public NetworkTableReader(final String networkName, final URL sourceURL,
+       public NetworkTableReader(final String networkName, final InputStream 
is,
                                  final NetworkTableMappingParameters nmp, 
final int startLineNumber,
                                  final String commentChar) {
                super(networkName);
-               this.sourceURL = sourceURL;
+               //this.sourceURL = sourceURL;
+               this.is = is;
                this.nmp = nmp;
                this.startLineNumber = startLineNumber;
                this.nodeList = new ArrayList<Long>();
@@ -126,7 +128,7 @@
         * @throws IOException DOCUMENT ME!
         */
        public void readTable(CyTable table) throws IOException {
-               InputStream is = null;
+               //InputStream is = null;
                String line;
 
                network.getCyRow().set("name", this.getNetworkName());
@@ -135,7 +137,7 @@
                try {
                        BufferedReader bufRd = null;
 
-                       is = URLUtil.getInputStream(sourceURL);
+                       //is = URLUtil.getInputStream(sourceURL);
                        try {
                                bufRd = new BufferedReader(new 
InputStreamReader(is));
                                /*

-- 
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