📄 brokertool.java
字号:
package org.rakiura.cpn.example.booking;/**/import java.util.Properties;/** * Represents a simple utility for a broker. * This class reads an input file, which must be * in standard Java properties format. The key is * the name of the service, the value on/off defines * if the service is available or not. * *<br><br> * BrokerTool.java<br> * Created: Thu Nov 1 00:36:16 2001<br> * * @author Mariusz Nowostawski (mariusz@rakiura.org) * @version $Revision: 1.1 $ $Date: 2001/10/31 12:36:58 $ */public class BrokerTool { Properties services = new Properties(); public BrokerTool(String filename) { try { services.load(new java.io.FileInputStream(filename)); } catch(java.io.IOException e){ e.printStackTrace(); System.exit(1); } } public boolean isAvailable(String service){ if(services.get(service) != null && services.get(service).equals("on")) return true; else return false; } } // BrokerTool//////////////////// end of file ////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -