gpt4 book ai didi

org.scijava.ui.behaviour.io.yaml.YamlConfigIO.read()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 20:19:31 27 4
gpt4 key购买 nike

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

YamlConfigIO.read介绍

[英]Reads from the specified reader instance and returns the list of serialized InputTriggerDescriptions that are found in the input stream.

Malformed serializations generate an error which is echoed on the console.
[中]从指定的读取器实例读取,并返回在输入流中找到的序列化InputRiggerDescriptions的列表。
格式错误的序列化会生成一个错误,该错误会在控制台上回显。

代码示例

代码示例来源:origin: org.scijava/ui-behaviour

/**
 * Reads from the specified file and returns the list of serialized
 * {@link InputTriggerDescription}s that are found in the file.
 *
 * @param fileName
 *            the system-dependent filename.
 * @return a new list containing the {@link InputTriggerDescription}s found
 *         in the file. Empty if the file is malformed.
 * @throws IOException
 *             if an I/O error occurs, if the named file does not exist, is
 *             a directory rather than a regular file, or for some other
 *             reason cannot be opened for reading.
 */
public static List< InputTriggerDescription > read( final String fileName ) throws IOException
{
  final FileReader reader = new FileReader( fileName );
  final List< InputTriggerDescription > descriptions = read( reader );
  reader.close();
  return descriptions;
}

代码示例来源:origin: sc.fiji/bigdataviewer-core

conf = new InputTriggerConfig( YamlConfigIO.read( "bdvkeyconfig.yaml" ) );
  conf = new InputTriggerConfig( YamlConfigIO.read( fn ) );

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com