public class FileRepository extends Object implements UrlRepository, Serializable
Constructor and Description |
---|
FileRepository(File file)
Creates a new repository for the given file.
|
FileRepository(File file,
MimeRegistry mimeRegistry)
Creates a new repository for the given file.
|
Modifier and Type | Method and Description |
---|---|
MimeRegistry |
getMimeRegistry()
Returns the mime-registry for the repository.
|
ContentLocation |
getRoot()
Returns the repositories root directory entry.
|
URL |
getURL()
Returns the URL that represents this repository.
|
public FileRepository(File file) throws ContentIOException
file
- the directory, which should form the root of the repository.ContentIOException
- if an error prevents the repository creation.public FileRepository(File file, MimeRegistry mimeRegistry) throws ContentIOException
file
- the directory, which should form the root of the repository.mimeRegistry
- the mime registry to be used.ContentIOException
- if an error prevents the repository creation.public MimeRegistry getMimeRegistry()
getMimeRegistry
in interface Repository
MimeRegistry
public ContentLocation getRoot() throws ContentIOException
getRoot
in interface Repository
ContentIOException
- if an error occurs.public URL getURL() throws MalformedURLException
getURL
in interface UrlRepository
MalformedURLException
- if the URL could not be computed.