java.io.Serializable, Repository, UrlRepositorypublic class FileRepository extends java.lang.Object implements UrlRepository, java.io.Serializable
| Constructor | Description |
|---|---|
FileRepository(java.io.File file) |
Creates a new repository for the given file.
|
FileRepository(java.io.File file,
MimeRegistry mimeRegistry) |
Creates a new repository for the given file.
|
| Modifier and Type | Method | Description |
|---|---|---|
MimeRegistry |
getMimeRegistry() |
Returns the mime-registry for the repository.
|
ContentLocation |
getRoot() |
Returns the repositories root directory entry.
|
java.net.URL |
getURL() |
Returns the URL that represents this repository.
|
public FileRepository(java.io.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(java.io.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 RepositoryMimeRegistrypublic ContentLocation getRoot() throws ContentIOException
getRoot in interface RepositoryContentIOException - if an error occurs.public java.net.URL getURL()
throws java.net.MalformedURLException
getURL in interface UrlRepositoryjava.net.MalformedURLException - if the URL could not be computed.