java
文章平均质量分 86
浪也回头
这个作者很懒,什么都没留下…
展开
-
java 获取IP和MAC
java 获取IP和MAC标签(空格分隔): javajava 获取IP和MAC1获取IP2获取mac1、获取IPpublic static String getIpAddress() { try { Enumeration<NetworkInterface> allNetInterfaces = NetworkInterface.getNetworkI转载 2016-12-29 11:27:59 · 643 阅读 · 0 评论 -
java 格式化输出当前时间
import java.util.Date;import java.text.SimpleDateFormat;public class NowString {public static void main(String[] args) { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设...原创 2016-01-07 09:51:56 · 130 阅读 · 0 评论 -
java 常用文件管理
package file;import java.io.BufferedReader;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileWriter;import java.io.IOException;...原创 2016-01-07 10:33:03 · 167 阅读 · 0 评论 -
java 获取IP和MAC
// 获取ip地址 public static String getIpAddress() { try { Enumeration<NetworkInterface> allNetInterfaces = NetworkInterface.getNetworkInterfaces(); InetAddress ip = null; while (a...原创 2016-12-29 11:06:40 · 87 阅读 · 0 评论 -
递归处理未知类型的json
public static void putAllIdToMap(String json, String name, String id) { String value = ""; String key = ""; Map<String, Object> map = (Map<String, Object>)JsonUtils.jsonToMap...原创 2017-02-07 16:04:22 · 307 阅读 · 0 评论 -
swing 增加文件选择框
使用swing 增加文件选择框:private Component getFileButton() { if (fileButton == null) { fileButton = new JButton("......"); fileButton.setBounds(445, 135, 54, 23); fileButton.addActionListener...原创 2017-02-08 16:49:51 · 606 阅读 · 0 评论