Class HttpDirectoryImpl
- java.lang.Object
-
- net.officefloor.web.resource.impl.AbstractHttpResource
-
- net.officefloor.web.resource.impl.HttpDirectoryImpl
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,HttpDirectory
,HttpResource
public class HttpDirectoryImpl extends AbstractHttpResource implements HttpDirectory
HttpDirectory
implementation.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from class net.officefloor.web.resource.impl.AbstractHttpResource
path
-
-
Constructor Summary
Constructors Constructor Description HttpDirectoryImpl(java.lang.String path, HttpResourceStore store)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
HttpFile
getDefaultHttpFile()
Obtains the defaultHttpFile
for theHttpDirectory
.boolean
isExist()
Indicates if thisHttpResource
exists.-
Methods inherited from class net.officefloor.web.resource.impl.AbstractHttpResource
equals, getPath, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.web.resource.HttpResource
getPath
-
-
-
-
Constructor Detail
-
HttpDirectoryImpl
public HttpDirectoryImpl(java.lang.String path, HttpResourceStore store)
Instantiate.- Parameters:
path
- Path to theHttpDirectory
.store
-HttpResourceStore
.
-
-
Method Detail
-
isExist
public boolean isExist()
Description copied from interface:HttpResource
Indicates if this
HttpResource
exists. Should thisHttpResource
not exist, only the path will be available.This allows for caching of
HttpResource
instances not existing.- Specified by:
isExist
in interfaceHttpResource
- Returns:
true
if thisHttpResource
exists.
-
getDefaultHttpFile
public HttpFile getDefaultHttpFile() throws java.io.IOException
Description copied from interface:HttpDirectory
Obtains the defaultHttpFile
for theHttpDirectory
.- Specified by:
getDefaultHttpFile
in interfaceHttpDirectory
- Returns:
- Default
HttpFile
. - Throws:
java.io.IOException
- If failure in finding theHttpFile
.
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-