org.eclipse.jgit.util.FS.readPipe()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(119)

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

FS.readPipe介绍

[英]Execute a command and return a single line of output as a String
[中]执行命令并以字符串形式返回单行输出

代码示例

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit

/**
 * Execute a command and return a single line of output as a String
 *
 * @param dir
 *            Working directory for the command
 * @param command
 *            as component array
 * @param encoding
 *            to be used to parse the command's output
 * @return the one-line output of the command or {@code null} if there is
 *         none
 * @throws org.eclipse.jgit.errors.CommandFailedException
 *             thrown when the command failed (return code was non-zero)
 */
@Nullable
protected static String readPipe(File dir, String[] command,
    String encoding) throws CommandFailedException {
  return readPipe(dir, command, encoding, null);
}

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit

v = readPipe(gitExe.getParentFile(),
  new String[] { "git", "--version" }, //$NON-NLS-1$ //$NON-NLS-2$
  Charset.defaultCharset().name());
w = readPipe(gitExe.getParentFile(),
  new String[] { "git", "config", "--system", "--edit" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
  Charset.defaultCharset().name(), env);

代码示例来源:origin: sonia.jgit/org.eclipse.jgit

/**
 * Execute a command and return a single line of output as a String
 *
 * @param dir
 *            Working directory for the command
 * @param command
 *            as component array
 * @param encoding
 *            to be used to parse the command's output
 * @return the one-line output of the command or {@code null} if there is
 *         none
 * @throws CommandFailedException
 *             thrown when the command failed (return code was non-zero)
 */
@Nullable
protected static String readPipe(File dir, String[] command,
    String encoding) throws CommandFailedException {
  return readPipe(dir, command, encoding, null);
}

代码示例来源:origin: berlam/github-bucket

/**
 * Execute a command and return a single line of output as a String
 *
 * @param dir
 *            Working directory for the command
 * @param command
 *            as component array
 * @param encoding
 *            to be used to parse the command's output
 * @return the one-line output of the command or {@code null} if there is
 *         none
 * @throws org.eclipse.jgit.errors.CommandFailedException
 *             thrown when the command failed (return code was non-zero)
 */
@Nullable
protected static String readPipe(File dir, String[] command,
    String encoding) throws CommandFailedException {
  return readPipe(dir, command, encoding, null);
}

代码示例来源:origin: sonia.jgit/org.eclipse.jgit

v = readPipe(gitExe.getParentFile(),
  new String[] { "git", "--version" }, //$NON-NLS-1$ //$NON-NLS-2$
  Charset.defaultCharset().name());
w = readPipe(gitExe.getParentFile(),
  new String[] { "git", "config", "--system", "--edit" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
  Charset.defaultCharset().name(), env);

代码示例来源:origin: berlam/github-bucket

v = readPipe(gitExe.getParentFile(),
  new String[] { "git", "--version" }, //$NON-NLS-1$ //$NON-NLS-2$
  Charset.defaultCharset().name());
w = readPipe(gitExe.getParentFile(),
  new String[] { "git", "config", "--system", "--edit" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
  Charset.defaultCharset().name(), env);

相关文章