public class ResourceFile extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
COMPRESSED_HASH |
protected int |
current_version |
static int |
DEFAULT_CONNECTION_TIMEOUT
Default value for resource downloading connection timeout - see
ND4JSystemProperties.RESOURCES_CONNECTION_TIMEOUT |
static int |
DEFAULT_READ_TIMEOUT
Default value for resource downloading read timeout - see
ND4JSystemProperties.RESOURCES_READ_TIMEOUT |
protected String |
filePath |
protected static String |
HASH |
static org.nd4j.shade.jackson.databind.ObjectMapper |
MAPPER |
protected static int |
MAX_DOWNLOAD_ATTEMPTS |
protected static String |
PATH_KEY |
protected Map<String,String> |
v1 |
| Constructor and Description |
|---|
ResourceFile() |
| Modifier and Type | Method and Description |
|---|---|
static ResourceFile |
fromFile(File file) |
static ResourceFile |
fromFile(String path) |
protected File |
getLocalFile(File cacheRootDir)
Get the local file - or where it *would* be if it has been downloaded.
|
File |
localFile(File cacheRootDir)
Get the local file - downloading and caching if required
|
boolean |
localFileExistsAndValid(File cacheRootDir) |
static org.nd4j.shade.jackson.databind.ObjectMapper |
newMapper() |
String |
relativePath() |
static String |
sha256(File f) |
public static final int DEFAULT_CONNECTION_TIMEOUT
ND4JSystemProperties.RESOURCES_CONNECTION_TIMEOUTpublic static final int DEFAULT_READ_TIMEOUT
ND4JSystemProperties.RESOURCES_READ_TIMEOUTprotected static final String PATH_KEY
protected static final String HASH
protected static final String COMPRESSED_HASH
protected static final int MAX_DOWNLOAD_ATTEMPTS
public static final org.nd4j.shade.jackson.databind.ObjectMapper MAPPER
protected int current_version
protected String filePath
public static ResourceFile fromFile(String path)
public static ResourceFile fromFile(File file)
public String relativePath()
public boolean localFileExistsAndValid(File cacheRootDir)
protected File getLocalFile(File cacheRootDir)
public File localFile(File cacheRootDir)
public static final org.nd4j.shade.jackson.databind.ObjectMapper newMapper()
Copyright © 2021. All rights reserved.