Package org.nd4j.common.io
Class AbstractFileResolvingResource
- java.lang.Object
-
- org.nd4j.common.io.AbstractResource
-
- org.nd4j.common.io.AbstractFileResolvingResource
-
- All Implemented Interfaces:
InputStreamSource
,Resource
- Direct Known Subclasses:
ClassPathResource
public abstract class AbstractFileResolvingResource extends AbstractResource
-
-
Constructor Summary
Constructors Constructor Description AbstractFileResolvingResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
contentLength()
boolean
exists()
Whether the resource exists on the classpathFile
getFile()
protected File
getFile(URI uri)
protected File
getFileForLastModifiedCheck()
boolean
isReadable()
long
lastModified()
-
Methods inherited from class org.nd4j.common.io.AbstractResource
createRelative, equals, getFilename, getURI, getURL, hashCode, isOpen, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nd4j.common.io.InputStreamSource
getInputStream
-
Methods inherited from interface org.nd4j.common.io.Resource
getDescription
-
-
-
-
Method Detail
-
getFile
public File getFile() throws IOException
- Specified by:
getFile
in interfaceResource
- Overrides:
getFile
in classAbstractResource
- Returns:
- Throws:
IOException
-
getFileForLastModifiedCheck
protected File getFileForLastModifiedCheck() throws IOException
- Overrides:
getFileForLastModifiedCheck
in classAbstractResource
- Throws:
IOException
-
getFile
protected File getFile(URI uri) throws IOException
- Throws:
IOException
-
exists
public boolean exists()
Description copied from interface:Resource
Whether the resource exists on the classpath- Specified by:
exists
in interfaceResource
- Overrides:
exists
in classAbstractResource
- Returns:
-
isReadable
public boolean isReadable()
- Specified by:
isReadable
in interfaceResource
- Overrides:
isReadable
in classAbstractResource
- Returns:
-
contentLength
public long contentLength() throws IOException
- Specified by:
contentLength
in interfaceResource
- Overrides:
contentLength
in classAbstractResource
- Returns:
- Throws:
IOException
-
lastModified
public long lastModified() throws IOException
- Specified by:
lastModified
in interfaceResource
- Overrides:
lastModified
in classAbstractResource
- Returns:
- Throws:
IOException
-
-