当前位置:网站首页>Roperties class configuration file & DOS to view the host network situation
Roperties class configuration file & DOS to view the host network situation
2022-07-30 03:57:00 【Zinksl】
Article table of contents

Introduction
Hello everyone, I am: a pine
Seriously share technology and record learning bits
If sharing is useful to you, please support me
Like: Comment: Favorite: ️
Personal motto: Ideas are implementedThe best time is now!
1 Properties class is very convenient to operate .properties configuration file
1.1 Properties common methods
method name | Description |
---|---|
load | Load key-value pairs from the configuration file into the Properties object |
list | Display data to the specified device |
getProperties(key) | Get value by key |
setProperties(key,value) | Set key-value pair to Properties object |
store | Store the key-value pair in Properties into the configuration file. If the configuration file contains Chinese in IDEA, it will be converted to the corresponding Unicode encoding |
1.2 code example:
public class PropertiesDemo {public static void main(String[] args) throws IOException {// Create Properties objectProperties properties = new Properties();// load fileproperties.load(new FileReader("E:\\Codes\\myProject\\JiShiTongXun\\propertiesDemo\\mysql.properties"));// pass in the standard output streamproperties.list(System.out);// get the valueString user = properties.getProperty("name");String age = properties.getProperty("age");System.out.println("Username: "+user+" Age: "+age);// Set the key-value pair, if the key exists, it is modified, if the key does not exist, create a new oneproperties.setProperty("name","java");// get the valueString user2 = properties.getProperty("name");System.out.println("Username: "+user2+" Age: "+age);// create new fileproperties.setProperty("lookMoonup","zhangjie");// store K-V to fileproperties.store(new FileOutputStream("E:\\Codes\\myProject\\JiShiTongXun\\propertiesDemo\\mysqlsave.properties"),null);System.out.println("Save successfully");}}
2 netstat -an : View the current host network status, including port status and network connection
netstat -an | more: 分页显示
netstat -anb: 可以查看是哪个程序使用端口
Conclusion
Please stay here
Since you see this, why don't you like itlet's go
The purpose of this article is to share the technology and remember the points that need to be paid attention to in the learning process, and record the learning process;
If there is any error, please correct me, if you have any comments or suggestions, please welcomeDiscuss in the comments section
边栏推荐
- 弘玑再度入围Gartner 2022 RPA魔力象限并实现位置大幅跃升
- STM32 SPI+WM8978语音回环
- How does the AI intelligent security video platform EasyCVR configure the simultaneous transmission of audio and video?
- 第51篇-知乎请求头参数分析【2022-07-28】
- 对均匀采样信号进行重采样
- Nacos集群分区
- 骁龙7系芯片表现如何?Reno8 Pro佐证新一代神U
- 小程序毕设作品之微信二手交易小程序毕业设计成品(6)开题答辩PPT
- LoadBalancer 负载均衡
- Tcp编程
猜你喜欢
Let's learn the layout components of flutter together
Nacos installation and deployment
Send it to your friends and let TA treat you to fried chicken!
route filter
护网行动基本介绍
Basic introduction to protect the network operations
The difference between BGP room and ordinary room in Beijing
vscode 调试和远程
Hystrix 服务熔断
小程序毕设作品之微信积分商城小程序毕业设计成品(4)开题报告
随机推荐
Resampling a uniformly sampled signal
sublime text 3 settings
2022.7.29-----leetcode.593
Gateway routing gateway
ospf 综合实验(重发布,特殊区域)
小程序毕设作品之微信积分商城小程序毕业设计成品(3)后台功能
Uptime Monitoring: How to Ensure Network Device Uptime
【驱动】udev设置GPIO加载后所有者、所属组和权限
spicy (two) unit hooks
flutter 记录学习不一样的动画(一)
小程序毕设作品之微信二手交易小程序毕业设计成品(2)小程序功能
Taobao/Tmall get the list of sold product orders API
Gateway 路由网关
LoadBalancer 负载均衡
When the EasyNVR platform is cascaded to the EasyCVR, why can't the video be played after a while?
运行时间监控:如何确保网络设备运行时间
vscode debugging and remote
spicy (1) basic definition
小程序毕设作品之微信积分商城小程序毕业设计成品(1)开发概要
(6) "Digital Electricity" - Diodes and CMOS Gate Circuits (Introduction)