public class FSPURLConnection extends URLConnection
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches| Modifier | Constructor and Description |
|---|---|
protected |
FSPURLConnection(URL u)
creates a new URL connection with FSP protocol.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
gets file status from FSP server
throws IOException if there is problem with server communication
|
int |
getConnectTimeout()
Get connection timeout.
|
String |
getContentEncoding()
FSP do not have concept of transfer encodings.
|
int |
getContentLength()
Get content-length.
|
String |
getContentType()
Get content type.
|
long |
getDate()
Get date of sending server.
|
static boolean |
getDefaultAllowUserInteraction()
Returns default value for allowUserInteraction field.
|
boolean |
getDefaultUseCaches()
Returns default value for useCaches.
|
long |
getExpiration()
Get value of Expires: header.
|
String |
getHeaderField(int n)
Returns value of nth header field.
|
String |
getHeaderField(String name)
Returns value of specified header field.
|
long |
getHeaderFieldDate(String name,
long Default)
Return value of header field parsed as date.
|
int |
getHeaderFieldInt(String name,
int Default)
Return value of header field parsed as integer.
|
String |
getHeaderFieldKey(int n)
Return field (header) name for nth header field.
|
Map |
getHeaderFields()
Return unmodifiable Map of header fields.
|
InputStream |
getInputStream()
returns input stream of file from FSPserver.
|
long |
getLastModified()
Return last-modified value for file or 0 if not known
|
OutputStream |
getOutputStream()
Returns an output stream that writes to this URL
|
Permission |
getPermission()
Permission needed for creating connection to this URL
|
boolean |
getUseCaches()
Get value of useCaches property
|
addRequestProperty, getAllowUserInteraction, getContent, getContent, getContentLengthLong, getDefaultRequestProperty, getDoInput, getDoOutput, getFileNameMap, getHeaderFieldLong, getIfModifiedSince, getReadTimeout, getRequestProperties, getRequestProperty, getURL, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toStringprotected FSPURLConnection(URL u)
u - FSP URL of targetpublic void connect()
throws IOException
connect in class URLConnectionIOExceptionpublic int getConnectTimeout()
getConnectTimeout in class URLConnectionpublic String getContentEncoding()
getContentEncoding in class URLConnectionpublic int getContentLength()
getContentLength in class URLConnectionpublic String getContentType()
getContentType in class URLConnectionpublic long getDate()
getDate in class URLConnectionpublic static boolean getDefaultAllowUserInteraction()
public boolean getDefaultUseCaches()
getDefaultUseCaches in class URLConnectionpublic long getExpiration()
getExpiration in class URLConnectionpublic String getHeaderField(int n)
getHeaderField in class URLConnectionn - field index, starting at zeropublic String getHeaderField(String name)
Only "last-modified" and "content-length" are supported.
getHeaderField in class URLConnectionname - header field name in lower casepublic long getHeaderFieldDate(String name, long Default)
getHeaderFieldDate in class URLConnectionname - field name. Only "last-modified" is supportedDefault - default value returned if no such header existspublic int getHeaderFieldInt(String name, int Default)
getHeaderFieldInt in class URLConnectionname - field name. only "content-length" is supportedDefault - default value returned if no such header existspublic String getHeaderFieldKey(int n)
getHeaderFieldKey in class URLConnectionn - field index, starting at zeropublic Map getHeaderFields()
getHeaderFields in class URLConnectionpublic InputStream getInputStream() throws IOException
getInputStream in class URLConnectionIOExceptionpublic long getLastModified()
getLastModified in class URLConnectionpublic OutputStream getOutputStream()
getOutputStream in class URLConnectionpublic Permission getPermission()
getPermission in class URLConnectionpublic boolean getUseCaches()
getUseCaches in class URLConnectionCopyright © 2019 FSP Project. All rights reserved.