public class FileURLConnection
extends java.net.URLConnection
| Modifier and Type | Field and Description |
|---|---|
(package private) static boolean |
decodeFilePaths |
protected java.io.File |
file
The underlying file
|
(package private) static boolean |
useURI |
| Constructor and Description |
|---|
FileURLConnection(java.net.URL url) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Checks if the underlying file for this connection exists.
|
java.io.File |
getFile()
Returns the underlying file for this connection.
|
java.lang.String |
getHeaderField(java.lang.String name)
Provides support for the following headers:
last-modified
content-length
content-type
date
|
java.io.InputStream |
getInputStream() |
long |
getLastModified()
Returns the last modified time of the underlying file.
|
java.io.OutputStream |
getOutputStream() |
java.security.Permission |
getPermission()
Return a permission for reading of the file
|
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFieldLong, getHeaderFields, getIfModifiedSince, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toStringstatic boolean decodeFilePaths
static boolean useURI
protected final java.io.File file
public FileURLConnection(java.net.URL url)
throws java.io.IOException
java.io.IOExceptionpublic java.io.File getFile()
public void connect()
throws java.io.IOException
connect in class java.net.URLConnectionjava.io.FileNotFoundExceptionjava.io.IOExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in class java.net.URLConnectionjava.io.IOExceptionpublic java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in class java.net.URLConnectionjava.io.IOExceptionpublic java.lang.String getHeaderField(java.lang.String name)
getHeaderField in class java.net.URLConnectionpublic java.security.Permission getPermission()
throws java.io.IOException
getPermission in class java.net.URLConnectionjava.io.IOExceptionpublic long getLastModified()
getLastModified in class java.net.URLConnection