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 RepositoryMimeRegistrypublic ContentLocation getRoot() throws ContentIOException
getRoot in interface RepositoryContentIOException - if an error occurs.public URL getURL() throws MalformedURLException
getURL in interface UrlRepositoryMalformedURLException - if the URL could not be computed.