⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.java

📁 利用hibernate框架进行开发的全景浏览与导航系统。
💻 JAVA
字号:
package com.shandong.test;

import java.io.BufferedReader;
import java.io.FileReader;
import java.util.LinkedList;
import java.util.List;

import com.shandong.business.iface.HotspotAdminService;
import com.shandong.business.imp.HotspotAdminServiceImp;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		method1();
	}

	public static void method1() {
		try {
			HotspotAdminService service = new HotspotAdminServiceImp();
			BufferedReader fr = new BufferedReader(new FileReader(
					"C:\\Floor 4.txt"));
			String line = fr.readLine();
			while (line != null && !line.equals("")) {
				if (line.substring(0, 1).equals(";")) {
					line = fr.readLine();
					continue;
				}
				int i = line.indexOf(" ");
				if (i == -1) {
					line = fr.readLine();
					continue;
				}
				String name = line.substring(0, i);
				String info = line.substring(i + 1);

				System.out.println(name + ", " + info);
				service.insertHotspot(name, info);
				line = fr.readLine();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static void method2() {
		try {
			List l = new LinkedList();
			l.add("a");
			l.add("b");
			l.add("p");
			l.add("q");
			HotspotAdminService service = new HotspotAdminServiceImp();
			service.exportHotspot(l, "c:\\Floor 1.txt");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -