Package org.nd4j.common.io
Class AbstractResource
- java.lang.Object
-
- org.nd4j.common.io.AbstractResource
-
- All Implemented Interfaces:
InputStreamSource,Resource
- Direct Known Subclasses:
AbstractFileResolvingResource,VfsResource
public abstract class AbstractResource extends Object implements Resource
-
-
Constructor Summary
Constructors Constructor Description AbstractResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcontentLength()ResourcecreateRelative(String relativePath)booleanequals(Object obj)booleanexists()Whether the resource exists on the classpathFilegetFile()protected FilegetFileForLastModifiedCheck()StringgetFilename()URIgetURI()URLgetURL()inthashCode()booleanisOpen()booleanisReadable()longlastModified()StringtoString()-
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
-
exists
public boolean exists()
Description copied from interface:ResourceWhether the resource exists on the classpath
-
isReadable
public boolean isReadable()
- Specified by:
isReadablein interfaceResource- Returns:
-
getURL
public URL getURL() throws IOException
- Specified by:
getURLin interfaceResource- Returns:
- Throws:
IOException
-
getURI
public URI getURI() throws IOException
- Specified by:
getURIin interfaceResource- Returns:
- Throws:
IOException
-
getFile
public File getFile() throws IOException
- Specified by:
getFilein interfaceResource- Returns:
- Throws:
IOException
-
contentLength
public long contentLength() throws IOException- Specified by:
contentLengthin interfaceResource- Returns:
- Throws:
IOException
-
lastModified
public long lastModified() throws IOException- Specified by:
lastModifiedin interfaceResource- Returns:
- Throws:
IOException
-
getFileForLastModifiedCheck
protected File getFileForLastModifiedCheck() throws IOException
- Throws:
IOException
-
createRelative
public Resource createRelative(String relativePath) throws IOException
- Specified by:
createRelativein interfaceResource- Returns:
- Throws:
IOException
-
getFilename
public String getFilename()
- Specified by:
getFilenamein interfaceResource- Returns:
-
-