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