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 long
contentLength()
Resource
createRelative(String relativePath)
boolean
equals(Object obj)
boolean
exists()
Whether the resource exists on the classpathFile
getFile()
protected File
getFileForLastModifiedCheck()
String
getFilename()
URI
getURI()
URL
getURL()
int
hashCode()
boolean
isOpen()
boolean
isReadable()
long
lastModified()
String
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
-
exists
public boolean exists()
Description copied from interface:Resource
Whether the resource exists on the classpath
-
isReadable
public boolean isReadable()
- Specified by:
isReadable
in interfaceResource
- Returns:
-
getURL
public URL getURL() throws IOException
- Specified by:
getURL
in interfaceResource
- Returns:
- Throws:
IOException
-
getURI
public URI getURI() throws IOException
- Specified by:
getURI
in interfaceResource
- Returns:
- Throws:
IOException
-
getFile
public File getFile() throws IOException
- Specified by:
getFile
in interfaceResource
- Returns:
- Throws:
IOException
-
contentLength
public long contentLength() throws IOException
- Specified by:
contentLength
in interfaceResource
- Returns:
- Throws:
IOException
-
lastModified
public long lastModified() throws IOException
- Specified by:
lastModified
in interfaceResource
- Returns:
- Throws:
IOException
-
getFileForLastModifiedCheck
protected File getFileForLastModifiedCheck() throws IOException
- Throws:
IOException
-
createRelative
public Resource createRelative(String relativePath) throws IOException
- Specified by:
createRelative
in interfaceResource
- Returns:
- Throws:
IOException
-
getFilename
public String getFilename()
- Specified by:
getFilename
in interfaceResource
- Returns:
-
-