本文整理了Java中hudson.model.Fingerprint.load()
方法的一些代码示例,展示了Fingerprint.load()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fingerprint.load()
方法的具体详情如下:
包路径:hudson.model.Fingerprint
类名称:Fingerprint
方法名:load
[英]Loads a Fingerprint from a file in the image.
[中]从图像中的文件加载指纹。
代码示例来源:origin: jenkinsci/jenkins
protected Fingerprint loadFingerprint(File fingerprintFile) throws IOException {
return Fingerprint.load(fingerprintFile);
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Loads a {@link Fingerprint} from a file in the image.
* @return Loaded {@link Fingerprint}. Null if the config file does not exist or
* malformed.
*/
/*package*/ static @CheckForNull Fingerprint load(@Nonnull byte[] md5sum) throws IOException {
return load(getFingerprintFile(md5sum));
}
/*package*/ static @CheckForNull Fingerprint load(@Nonnull File file) throws IOException {
代码示例来源:origin: jenkinsci/jenkins
protected @CheckForNull Fingerprint load(@Nonnull String key) throws IOException {
return Fingerprint.load(toByteArray(key));
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Loads a {@link Fingerprint} from a file in the image.
*/
/*package*/ static Fingerprint load(byte[] md5sum) throws IOException {
return load(getFingerprintFile(md5sum));
}
/*package*/ static Fingerprint load(File file) throws IOException {
代码示例来源:origin: hudson/hudson-2.x
/**
* Loads a {@link Fingerprint} from a file in the image.
*/
/*package*/ static Fingerprint load(byte[] md5sum) throws IOException {
return load(getFingerprintFile(md5sum));
}
/*package*/ static Fingerprint load(File file) throws IOException {
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Loads a {@link Fingerprint} from a file in the image.
*/
/*package*/ static Fingerprint load(byte[] md5sum) throws IOException {
return load(getFingerprintFile(md5sum));
}
/*package*/ static Fingerprint load(File file) throws IOException {
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Loads a {@link Fingerprint} from a file in the image.
* @return Loaded {@link Fingerprint}. Null if the config file does not exist or
* malformed.
*/
/*package*/ static @CheckForNull Fingerprint load(@Nonnull byte[] md5sum) throws IOException {
return load(getFingerprintFile(md5sum));
}
/*package*/ static @CheckForNull Fingerprint load(@Nonnull File file) throws IOException {
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Loads a {@link Fingerprint} from a file in the image.
*/
/*package*/ static Fingerprint load(byte[] md5sum) throws IOException {
return load(getFingerprintFile(md5sum));
}
/*package*/ static Fingerprint load(File file) throws IOException {
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
protected @CheckForNull Fingerprint load(@Nonnull String key) throws IOException {
return Fingerprint.load(toByteArray(key));
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
protected Fingerprint load(String key) throws IOException {
return Fingerprint.load(toByteArray(key));
}
代码示例来源:origin: hudson/hudson-2.x
protected Fingerprint load(String key) throws IOException {
return Fingerprint.load(toByteArray(key));
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Examines the file and returns true if a file was deleted.
*/
private boolean check(File fingerprintFile) {
try {
Fingerprint fp = Fingerprint.load(fingerprintFile);
if(!fp.isAlive()) {
fingerprintFile.delete();
return true;
}
} catch (IOException e) {
logger.log(Level.WARNING, "Failed to process "+fingerprintFile, e);
}
return false;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
protected Fingerprint load(String key) throws IOException {
return Fingerprint.load(toByteArray(key));
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
protected Fingerprint load(String key) throws IOException {
return Fingerprint.load(toByteArray(key));
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Examines the file and returns true if a file was deleted.
*/
private boolean check(File fingerprintFile) {
try {
Fingerprint fp = Fingerprint.load(fingerprintFile);
if(!fp.isAlive()) {
fingerprintFile.delete();
return true;
}
} catch (IOException e) {
logger.log(Level.WARNING, "Failed to process "+fingerprintFile, e);
}
return false;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Examines the file and returns true if a file was deleted.
*/
private boolean check(File fingerprintFile) {
try {
Fingerprint fp = Fingerprint.load(fingerprintFile);
if (!fp.isAlive()) {
fingerprintFile.delete();
return true;
}
} catch (IOException e) {
logger.log(Level.WARNING, "Failed to process " + fingerprintFile, e);
}
return false;
}
private static final FileFilter LENGTH2DIR_FILTER = new FileFilter() {
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Examines the file and returns true if a file was deleted.
*/
private boolean check(File fingerprintFile) {
try {
Fingerprint fp = Fingerprint.load(fingerprintFile);
if(!fp.isAlive()) {
fingerprintFile.delete();
return true;
}
} catch (IOException e) {
logger.log(Level.WARNING, "Failed to process "+fingerprintFile, e);
}
return false;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Examines the file and returns true if a file was deleted.
*/
private boolean check(File fingerprintFile, TaskListener listener) {
try {
Fingerprint fp = Fingerprint.load(fingerprintFile);
if (fp == null || !fp.isAlive()) {
listener.getLogger().println("deleting obsolete " + fingerprintFile);
fingerprintFile.delete();
return true;
} else {
// get the fingerprint in the official map so have the changes visible to Jenkins
// otherwise the mutation made in FingerprintMap can override our trimming.
listener.getLogger().println("possibly trimming " + fingerprintFile);
fp = Jenkins.getInstance()._getFingerprint(fp.getHashString());
return fp.trim();
}
} catch (IOException e) {
Functions.printStackTrace(e, listener.error("Failed to process " + fingerprintFile));
return false;
}
}
内容来源于网络,如有侵权,请联系作者删除!