本文整理了Java中hudson.model.Run.getCharset
方法的一些代码示例,展示了Run.getCharset
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Run.getCharset
方法的具体详情如下:
包路径:hudson.model.Run
类名称:Run
方法名:getCharset
[英]Gets the charset in which the log file is written.
[中]获取写入日志文件的字符集。
代码示例来源:origin: jenkinsci/jenkins
private String convertBytesToString(List<Byte> bytes) {
Collections.reverse(bytes);
Byte[] byteArray = bytes.toArray(new Byte[bytes.size()]);
return new String(ArrayUtils.toPrimitive(byteArray), getCharset());
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets the log of the build as a string.
* @return Returns the log or an empty string if it has not been found
* @deprecated since 2007-11-11.
* Use {@link #getLog(int)} instead as it avoids loading
* the whole log into memory unnecessarily.
*/
@Deprecated
public @Nonnull String getLog() throws IOException {
return Util.loadFile(getLogFile(),getCharset());
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Used to URL-bind {@link AnnotatedLargeText}.
* @return A {@link Run} log with annotations
*/
public @Nonnull AnnotatedLargeText getLogText() {
return new AnnotatedLargeText(getLogFile(),getCharset(),!isLogUpdated(),this);
}
代码示例来源:origin: jenkinsci/jenkins
try (InputStream logInputStream = run.getLogInputStream()) {
IOUtils.skip(logInputStream, pos);
IOUtils.copy(new InputStreamReader(logInputStream, run.getCharset()), w);
代码示例来源:origin: jenkinsci/warnings-ng-plugin
/**
* Creates a new {@link ConsoleLogReaderFactory}.
*
* @param run
* the run that provides the console log
*/
public ConsoleLogReaderFactory(final Run<?, ?> run) {
super(run.getCharset(), ConsoleNote::removeNotes);
this.run = run;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
private String convertBytesToString(List<Byte> bytes) {
Collections.reverse(bytes);
Byte[] byteArray = bytes.toArray(new Byte[bytes.size()]);
return new String(ArrayUtils.toPrimitive(byteArray), getCharset());
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Gets the log of the build as a string.
* @return Returns the log or an empty string if it has not been found
* @deprecated since 2007-11-11.
* Use {@link #getLog(int)} instead as it avoids loading
* the whole log into memory unnecessarily.
*/
@Deprecated
public @Nonnull String getLog() throws IOException {
return Util.loadFile(getLogFile(),getCharset());
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Gets the log of the build as a string.
*
* @deprecated since 2007-11-11. Use {@link #getLog(int)} instead as it
* avoids loading the whole log into memory unnecessarily.
*/
@Deprecated
public String getLog() throws IOException {
return Util.loadFile(getLogFile(), getCharset());
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Gets the log of the build as a string.
*
* @deprecated since 2007-11-11.
* Use {@link #getLog(int)} instead as it avoids loading
* the whole log into memory unnecessarily.
*/
@Deprecated
public String getLog() throws IOException {
return Util.loadFile(getLogFile(),getCharset());
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Gets the log of the build as a string.
*
* @deprecated since 2007-11-11.
* Use {@link #getLog(int)} instead as it avoids loading
* the whole log into memory unnecessarily.
*/
@Deprecated
public String getLog() throws IOException {
return Util.loadFile(getLogFile(),getCharset());
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Gets the log of the build as a string.
*
* @deprecated since 2007-11-11.
* Use {@link #getLog(int)} instead as it avoids loading
* the whole log into memory unnecessarily.
*/
@Deprecated
public String getLog() throws IOException {
return Util.loadFile(getLogFile(),getCharset());
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-test-framework
/**
* Get entire log file (this method is deprecated in hudson.model.Run,
* but in tests it is OK to load entire log).
*/
protected static String getLog(Run run) throws IOException {
return Util.loadFile(run.getLogFile(), run.getCharset());
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-test-harness
/**
* Get entire log file (this method is deprecated in hudson.model.Run,
* but in tests it is OK to load entire log).
*/
protected static String getLog(Run run) throws IOException {
return Util.loadFile(run.getLogFile(), run.getCharset());
}
代码示例来源:origin: org.eclipse.hudson/hudson-test-framework
/**
* Get entire log file (this method is deprecated in hudson.model.Run, but
* in tests it is OK to load entire log).
*/
protected static String getLog(Run run) throws IOException {
return Util.loadFile(run.getLogFile(), run.getCharset());
}
代码示例来源:origin: jenkinsci/jenkins-test-harness
/**
* Get entire log file (this method is deprecated in hudson.model.Run,
* but in tests it is OK to load entire log).
*/
protected static String getLog(Run run) throws IOException {
return Util.loadFile(run.getLogFile(), run.getCharset());
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Used to URL-bind {@link AnnotatedLargeText}.
* @return A {@link Run} log with annotations
*/
public @Nonnull AnnotatedLargeText getLogText() {
return new AnnotatedLargeText(getLogFile(),getCharset(),!isLogUpdated(),this);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Used to URL-bind {@link AnnotatedLargeText}.
*/
public AnnotatedLargeText getLogText() {
return new AnnotatedLargeText(getLogFile(),getCharset(),!isLogUpdated(),this);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Used to URL-bind {@link AnnotatedLargeText}.
*/
public AnnotatedLargeText getLogText() {
return new AnnotatedLargeText(getLogFile(),getCharset(),!isLogUpdated(),this);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Used to URL-bind {@link AnnotatedLargeText}.
*/
public AnnotatedLargeText getLogText() {
return new AnnotatedLargeText(getLogFile(), getCharset(), !isLogUpdated(), this);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Used to URL-bind {@link AnnotatedLargeText}.
*/
public AnnotatedLargeText getLogText() {
return new AnnotatedLargeText(getLogFile(),getCharset(),!isLogUpdated(),this);
}
内容来源于网络,如有侵权,请联系作者删除!