• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java RuntimeIOException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.jetty.io.RuntimeIOException的典型用法代码示例。如果您正苦于以下问题:Java RuntimeIOException类的具体用法?Java RuntimeIOException怎么用?Java RuntimeIOException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RuntimeIOException类属于org.eclipse.jetty.io包,在下文中一共展示了RuntimeIOException类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: processRow

import org.eclipse.jetty.io.RuntimeIOException; //导入依赖的package包/类
@Override
public void processRow(ResultSet rs) throws SQLException {
    try {
        String metric = rs.getString("metric");
        int ts = rs.getInt("ts");
        double value = rs.getDouble("value");
        checkNewMetric(metric);
        fillNulls(ts);
        if (Double.isFinite(value)) {
            jsonWriter.value(value);
            nextTs = ts + step;
        }
    } catch (IOException e) {
        log.error("Failed to read data from CH", e);
        throw new RuntimeIOException(e);
    }
}
 
开发者ID:yandex,项目名称:graphouse,代码行数:18,代码来源:MetricDataService.java


示例2: FirmataProtocolHandler

import org.eclipse.jetty.io.RuntimeIOException; //导入依赖的package包/类
public FirmataProtocolHandler(RemoteDeviceFactory deviceFactory) {
	this.deviceFactory = deviceFactory;
	
	String hostname = PropertyUtil.getProperty(TCP_HOST_PROP, null);
	if (hostname != null) {
		int port = PropertyUtil.getIntProperty(TCP_PORT_PROP, DEFAULT_TCP_PORT);
		try {
			adapter = new SocketFirmataAdapter(this, hostname, port);
		} catch (IOException e) {
			throw new RuntimeIOException(e);
		}
		// } else {
		// String serial_port = PropertyUtil.getProperty(SERIAL_PORT_PROP, null);
		// if (serial_port != null) {
		// adapter = new SerialFirmataAdapter(serial_port)
		// }
	}
	if (adapter == null) {
		Logger.error("Please set either {} or {} property", TCP_HOST_PROP, SERIAL_PORT_PROP);
		throw new IllegalArgumentException("Either " + TCP_HOST_PROP + " or " + SERIAL_PORT_PROP + " must be set");
	}
}
 
开发者ID:mattjlewis,项目名称:diozero,代码行数:23,代码来源:FirmataProtocolHandler.java


示例3: loginAndAddBrandAndSwitchToGoods

import org.eclipse.jetty.io.RuntimeIOException; //导入依赖的package包/类
/**
 * 步骤:登录系统-添加品牌-切到商品档案界面
 *
 * @param brand 品牌对象
 */
public static void loginAndAddBrandAndSwitchToGoods(Brand brand) {
    // 登录系统
    if (LoginKeyword.loginSystem()) {
        LogUtils.info("登陆系统成功,当前登录用户为: [" + Constants.TEST_USERNAME + "].");
    } else {
        throw new RuntimeIOException("登录系统失败.");
    }
    // 先添加品牌,让商品类别绑定品牌
    MenuKeyword.selectMenu("档案", "品牌档案");
    BrandKeyword.addBrand(brand);
    BrowserKeyword.switchToDefaultFrameOrWindow();
    ElementKeyword.clickElement(By.xpath(".//span[text()='品牌档案']/parent::a/following-sibling::a"));
    // 选择档案-商品相关-商品档案菜单
    MenuKeyword.selectMenu("档案", "商品档案");
}
 
开发者ID:Airpy,项目名称:KeywordDrivenAutoTest,代码行数:21,代码来源:BusinessKeyword.java


示例4: render

import org.eclipse.jetty.io.RuntimeIOException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public String render(ModelAndView modelAndView) {
    ClasspathJtwigResource templateResource = new ClasspathJtwigResource(this.templateRoot + modelAndView.getViewName());

    JtwigTemplate template = new JtwigTemplate(templateResource, jtwigConfiguration);

    String result;

    try {
        // TODO: will break if the model is not a HashMap<String, Object>
        result = template.output(new JtwigModelMap().add((java.util.Map<String, Object>) modelAndView.getModel()));
    } catch (ParseException | CompileException | RenderException e) {
        throw new RuntimeIOException(e);
    }

    return result;
}
 
开发者ID:warhuhn,项目名称:warhuhn-spark-template-jtwig,代码行数:21,代码来源:JtwigTemplateEngine.java


示例5: finish

import org.eclipse.jetty.io.RuntimeIOException; //导入依赖的package包/类
public void finish() {
    try {
        endMetric();
    } catch (IOException e) {
        log.error("Failed to read data from CH", e);
        throw new RuntimeIOException(e);
    }
}
 
开发者ID:yandex,项目名称:graphouse,代码行数:9,代码来源:MetricDataService.java


示例6: render

import org.eclipse.jetty.io.RuntimeIOException; //导入依赖的package包/类
@Override
public String render(ModelAndView modelAndView) {
    String viewName = modelAndView.getViewName();
    try {
        Template template = handlebars.compile(viewName);
        return template.apply(modelAndView.getModel());
    } catch (IOException e) {
        throw new RuntimeIOException(e);
    }
}
 
开发者ID:VoxelGamesLib,项目名称:VoxelGamesLib,代码行数:11,代码来源:MaTemplateEngine.java


示例7: loginAndGoodsAndSwitchToBill

import org.eclipse.jetty.io.RuntimeIOException; //导入依赖的package包/类
/**
 * 步骤:登录系统-添加品牌-添加商品
 *
 * @param brand     品牌对象
 * @param goodsType 商品类别对象
 * @param goodsList 商品档案对象列表
 */
public static void loginAndGoodsAndSwitchToBill(Brand brand, GoodsType goodsType, List<Goods> goodsList) {
    String byGoodsFrame = ".//iframe[@id='erp/doc/goods/list']";
    String byBrandFrame = ".//iframe[@id='erp/doc/brand/list']";
    // 登录系统
    if (LoginKeyword.loginSystem()) {
        LogUtils.info("登陆系统成功,当前登录用户为: [" + Constants.TEST_USERNAME + "].");
    } else {
        throw new RuntimeIOException("登录系统失败.");
    }
    // 先添加品牌,让商品类别绑定品牌
    MenuKeyword.selectMenu("档案", "品牌档案");
    BrowserKeyword.switchToFrame(By.xpath(byBrandFrame));
    BrandKeyword.addBrand(brand);
    PageKeyword.closeTag("品牌档案");
    // 选择档案-商品相关-商品档案菜单
    MenuKeyword.selectMenu("档案", "商品档案");
    // 切换到添加商品档案Frame
    BrowserKeyword.switchToFrame(By.xpath(byGoodsFrame));
    for (Goods goods : goodsList) {
        // 添加商品类别
        GoodsTypeKeyword.addFirstGoodsType(goodsType);
        // 添加商品档案
        GoodsKeyword.addGoods(goodsType.getName(), goods);
    }
    // 切回原来的Frame
    PageKeyword.closeTag("商品档案");
}
 
开发者ID:Airpy,项目名称:KeywordDrivenAutoTest,代码行数:35,代码来源:BusinessKeyword.java


示例8: setUp

import org.eclipse.jetty.io.RuntimeIOException; //导入依赖的package包/类
@Before
public void setUp() {
    LogUtils.info("--------------------测试预处理:登录系统--------------------");
    // 登录系统
    if (LoginKeyword.loginSystem()) {
        LogUtils.info("登陆系统成功,当前登录用户为: [" + Constants.TEST_USERNAME + "].");
    } else {
        throw new RuntimeIOException("登录系统失败.");
    }
    // 选择档案-商品相关-商品档案菜单
    MenuKeyword.selectMenu("档案", "品牌档案");
}
 
开发者ID:Airpy,项目名称:KeywordDrivenAutoTest,代码行数:13,代码来源:Test002_Product_TestBrand.java


示例9: render

import org.eclipse.jetty.io.RuntimeIOException; //导入依赖的package包/类
@Override
public String render(ModelAndView modelAndView) {
    String viewName = modelAndView.getViewName();
    Mustache mustache = mustacheFactory.compile(viewName);
    StringWriter stringWriter = new StringWriter();
    try {
        mustache.execute(stringWriter, modelAndView.getModel()).close();
    } catch (IOException e) {
        throw new RuntimeIOException(e);
    }
    return stringWriter.toString();
}
 
开发者ID:perwendel,项目名称:spark-template-engines,代码行数:13,代码来源:MustacheTemplateEngine.java


示例10: processQueue

import org.eclipse.jetty.io.RuntimeIOException; //导入依赖的package包/类
void processQueue() {
  EngineOutput o;
  while(true) {
    o = engine.getOutput();
    if(o == null) continue;
    HashMap<ServletResponse,AsyncContext> listeners;
    synchronized(outputs) {
      listeners = outputs.get(o.uuid);
    }
    if(listeners == null) continue;
    Set<Map.Entry<ServletResponse,AsyncContext>> lo;
    synchronized(listeners) {
      lo = listeners.entrySet();
    }
    for (Map.Entry<ServletResponse,AsyncContext> me : lo) {
      AsyncContext ac = me.getValue();
      ServletResponse response = ac.getResponse();
      try {
        ServletOutputStream out = response.getOutputStream();
        out.print("<script type=\"text/javascript\">__cb(");
        out.print("[");
        for(int i=0; i<o.object.length; i++) {
          if(i>0) out.print(",");
          out.print(o.object[i]);
        }
        out.print("]);</script>\n");
        response.flushBuffer();
      }
      catch(IOException ioe) { ac.complete(); }
      catch(RuntimeIOException eof) { cleanupResponse(response); }
    }
  }
}
 
开发者ID:circonus-labs,项目名称:logstream,代码行数:34,代码来源:EngineOutputHandler.java


示例11: ProjectFile

import org.eclipse.jetty.io.RuntimeIOException; //导入依赖的package包/类
ProjectFile(final File configFile) {
	this.configFile=configFile;
	this.id=configFile.getName();
	IOUtil.assertFileIsReadable(configFile);
	BufferedReader r=null;
	try {
		r=IOUtils.openFileForBufferedReading(this.configFile);
		String line;
		while((line=r.readLine())!=null)
			{	
			if(line.trim().isEmpty()) continue;
			if(line.startsWith("#"))
				{
				line=line.substring(1);
				int colon = line.indexOf(":");
				if(colon>0 )
					{
					final String key = line.substring(0,colon).trim().toLowerCase();
					final String value = line.substring(colon+1).trim();
					if(key.equals("id")) this.id=value;
					else if(key.equals("name") || key.equals("label")) this.label=value;
					else if(key.equals("desc") || key.equals("description")) this.description=value;
					}
				continue;
				}
			final Path file= Paths.get(line.trim());
			ngsFiles.add(file);
			}
	} catch (IOException err) {
		throw new RuntimeIOException(err);
	}
}
 
开发者ID:lindenb,项目名称:jvarkit,代码行数:33,代码来源:ProjectServer.java


示例12: ProjectHandler

import org.eclipse.jetty.io.RuntimeIOException; //导入依赖的package包/类
ProjectHandler(final File configFile) {
BufferedReader in= null;
try {
	in= new BufferedReader(new FileReader(configFile));
} catch (IOException e) {
	throw new RuntimeIOException(e);
	}
finally 
	{
	CloserUtil.close(in);
	}
//TODO
projects= new ArrayList<>();
}
 
开发者ID:lindenb,项目名称:jvarkit,代码行数:15,代码来源:ProjectServer.java



注:本文中的org.eclipse.jetty.io.RuntimeIOException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TaskAttemptListenerImpl类代码示例发布时间:2022-05-22
下一篇:
Java Skin类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap