Package org.fastnate.data.files
Class UrlDataFile
java.lang.Object
org.fastnate.data.files.UrlDataFile
- All Implemented Interfaces:
DataFile
Represents a data file from an URL.
- Author:
- Tobias Liefke
-
Constructor Summary
ConstructorsConstructorDescriptionUrlDataFile(URL url) Creates a new file from an URL without information about the parent folder.UrlDataFile(DataFolder folder, URL url) Creates a newUrlDataFileinstance. -
Method Summary
-
Constructor Details
-
UrlDataFile
Creates a new file from an URL without information about the parent folder.- Parameters:
url- the URL of the file we represent
-
UrlDataFile
Creates a newUrlDataFileinstance.- Parameters:
folder- The parent folder, if any.url- The represented file as URL.
-
-
Method Details
-
getName
Description copied from interface:DataFileThe name of this file. -
open
Description copied from interface:DataFileOpens this file for input. The caller is responsible to close the stream.- Specified by:
openin interfaceDataFile- Returns:
- the input stream of this file
- Throws:
IOException- if the file is not accessible
-
getFolder
The parent folder, if any. -
getUrl
The represented file as URL.
-