Package com.pd4ml
Class ResourceProvider
- java.lang.Object
-
- com.pd4ml.util.Base
-
- com.pd4ml.ResourceProvider
-
public abstract class ResourceProvider extends com.pd4ml.util.Base
Base class for customer resource reader implementations
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
mime
java.net.URL
redirected
-
Constructor Summary
Constructors Constructor Description ResourceProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
canLoad(java.lang.String resource, com.pd4ml.cache.FileCache cache)
abstract void
closeResourceStream()
boolean
dontCache()
java.lang.String
getEncoding()
java.lang.String
getMime()
byte[]
getResourceAsBytes(java.lang.String resource, com.pd4ml.cache.FileCache cache)
abstract java.io.BufferedInputStream
getResourceAsStream(java.lang.String resource, com.pd4ml.cache.FileCache cache)
boolean
isDirectory()
abstract java.io.File
localFile()
-
-
-
Method Detail
-
getResourceAsStream
public abstract java.io.BufferedInputStream getResourceAsStream(java.lang.String resource, com.pd4ml.cache.FileCache cache) throws java.io.IOException
- Throws:
java.io.IOException
-
canLoad
public abstract boolean canLoad(java.lang.String resource, com.pd4ml.cache.FileCache cache)
-
dontCache
public boolean dontCache()
-
localFile
public abstract java.io.File localFile()
-
closeResourceStream
public abstract void closeResourceStream()
-
getResourceAsBytes
public byte[] getResourceAsBytes(java.lang.String resource, com.pd4ml.cache.FileCache cache) throws java.io.IOException
- Throws:
java.io.IOException
-
getMime
public java.lang.String getMime()
-
getEncoding
public java.lang.String getEncoding()
-
isDirectory
public boolean isDirectory()
-
-