hudson.model.Run.getCharset()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(85)

本文整理了Java中hudson.model.Run.getCharset方法的一些代码示例,展示了Run.getCharset的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Run.getCharset方法的具体详情如下:
包路径:hudson.model.Run
类名称:Run
方法名:getCharset

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);
}

相关文章

微信公众号

最新文章

更多

Run类方法