Class DirectRead
- java.lang.Object
-
- org.logdoc.fairhttp.service.http.statics.DirectRead
-
- All Implemented Interfaces:
Function<String,Http.Response>
public class DirectRead extends Object
- Author:
- Denis Danilin | me@loslobos.ru 04.03.2023 13:30 fair-http-server ☭ sweat and blood
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanautoDirListprotected booleancacheprotected booleangotIndexprotected Set<String>indexFileprotected longmaxCacheLifeprotected longmaxCacheSize
-
Constructor Summary
Constructors Constructor Description DirectRead(com.typesafe.config.Config staticsCfg, String root)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Http.Responseapply(String s)protected voidcacheMe(String id, Http.Response response)protected byte[]dirList(String dirName, Collection<org.logdoc.fairhttp.service.http.statics.StaticRead.FRes> content)static Http.ResponsefileResponse(Path p, String mimeType, long size)protected StringgetMime(String ext)protected Http.ResponsepickCached(String id)protected StringrefreshMime(String id)protected voidrememberMime(String id, String mime)
-
-
-
Constructor Detail
-
DirectRead
public DirectRead(com.typesafe.config.Config staticsCfg, String root)
-
-
Method Detail
-
apply
public Http.Response apply(String s)
-
fileResponse
public static Http.Response fileResponse(Path p, String mimeType, long size)
-
dirList
protected byte[] dirList(String dirName, Collection<org.logdoc.fairhttp.service.http.statics.StaticRead.FRes> content)
-
cacheMe
protected void cacheMe(String id, Http.Response response)
-
pickCached
protected Http.Response pickCached(String id)
-
-