/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Open an file input stream given a URL.
* @author James Gosling
* @author Steven B. Byrne
*/
boolean isDirectory = false;
boolean exists = false;
super(u);
}
/*
* Note: the semantics of FileURLConnection object is that the
* results of the various URLConnection calls, such as
* getContentType, getInputStream or getContentLength reflect
* whatever was true when connect was called.
*/
if (!connected) {
try {
if (isDirectory) {
} else {
// Check if URL should be metered
if (meteredInput) {
}
}
} catch (IOException e) {
throw e;
}
connected = true;
}
}
private boolean initializedHeaders = false;
private void initializeHeaders() {
try {
connect();
} catch (IOException e) {
}
if (!initializedHeaders || !exists) {
if (!isDirectory) {
if (contentType != null) {
}
/*
* Format the last-modified field into the preferred
* Internet standard - ie: fixed-length subset of that
* defined by RFC 1123
*/
if (lastModified != 0) {
}
} else {
}
initializedHeaders = true;
}
}
return super.getHeaderField(name);
}
return super.getHeaderField(n);
}
public int getContentLength() {
return -1;
return (int) length;
}
public long getContentLengthLong() {
return length;
}
return super.getHeaderFieldKey(n);
}
return super.getProperties();
}
public long getLastModified() {
return lastModified;
}
throws IOException {
int iconHeight;
int iconWidth;
connect();
if (isDirectory) {
throw new FileNotFoundException(filename);
}
}
// Put it into a (default) locale-specific byte-stream.
} else {
throw new FileNotFoundException(filename);
}
}
return is;
}
/* since getOutputStream isn't supported, only read permission is
* relevant
*/
if (permission == null) {
} else {
permission = new FilePermission(
}
}
return permission;
}
}