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
HttpDirectoryimplementation.- 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 voidclose()HttpFilegetDefaultHttpFile()Obtains the defaultHttpFilefor theHttpDirectory.booleanisExist()Indicates if thisHttpResourceexists.-
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:HttpResourceIndicates if this
HttpResourceexists. Should thisHttpResourcenot exist, only the path will be available.This allows for caching of
HttpResourceinstances not existing.- Specified by:
isExistin interfaceHttpResource- Returns:
trueif thisHttpResourceexists.
-
getDefaultHttpFile
public HttpFile getDefaultHttpFile() throws java.io.IOException
Description copied from interface:HttpDirectoryObtains the defaultHttpFilefor theHttpDirectory.- Specified by:
getDefaultHttpFilein interfaceHttpDirectory- Returns:
- Default
HttpFile. - Throws:
java.io.IOException- If failure in finding theHttpFile.
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-