/[classpath]/classpath/gnu/java/net/protocol/file/FileURLConnection.java
ViewVC logotype

Diff of /classpath/gnu/java/net/protocol/file/FileURLConnection.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by nferrier, Tue Mar 19 13:51:53 2002 UTC revision 1.6 by cbj, Thu Mar 21 05:40:11 2002 UTC
# Line 63  public class FileURLConnection extends j Line 63  public class FileURLConnection extends j
63     */     */
64    private java.io.FileOutputStream out_stream;    private java.io.FileOutputStream out_stream;
65    
     
66    
67      
68    /**    /**
69     * Calls superclass constructor to initialize.     * Calls superclass constructor to initialize.
70     */     */
71    protected FileURLConnection (java.net.URL url)    protected FileURLConnection(java.net.URL url)
72    {    {
73      super(url);      super(url);
74        
75      /* Set up some variables */      /* Set up some variables */
76      doOutput = false;      doOutput = false;
77    }    }
78      
79      /*************************************************************************/
80      
81      /*
82       * Instance Methods
83       */
84      
85    /**    /**
86     * "Connects" to the file by opening it.     * "Connects" to the file by opening it.
87     */     */
88    public void connect ()    public void connect() throws java.io.IOException
     throws java.io.IOException  
89    {    {
90        if(connected)return;
91      file = new java.io.File(getURL().getFile());      file = new java.io.File(getURL().getFile());
92        if(!file.exists())
93          throw new java.io.FileNotFoundException(file.getPath());
94        connected = true;
95    }    }
96      
97    /**    /**
98     * Opens the file for reading and returns a stream for it.     * Opens the file for reading and returns a stream for it.
99     *     *

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26