![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
caicanfly
这个作者很懒,什么都没留下…
展开
-
java写入.dat文件
[code="java"]public static void writeDatFile(List list, String fileName) throws Exception { FileOutputStream fos = null; ObjectOutputStream oos = null; try { fos = new FileOutputStrea...原创 2012-09-11 11:30:48 · 2221 阅读 · 0 评论 -
java读取.dat文件
[code="java"] private static List getDatFile(String fileName) throws IOException{ FileInputStream fis = null; ObjectInputStream ois = null; List list = new ArrayList(); Object obj = null...原创 2012-09-11 11:31:08 · 8004 阅读 · 0 评论 -
Map按Value排序
[code="java"] public static Map sortByValue(Map map) { List list = new LinkedList(map.entrySet()); Collections.sort(list, new Comparator(){ public int compare(Object o...原创 2012-09-11 17:52:52 · 130 阅读 · 0 评论 -
读取txt文件
[code="java"] /** * 读取txt文件 * * @param srcPathName * @return */ public static Vector readText(String srcPathName) { Vector vc = new Vector(); ArrayList al = null; double l ...2012-09-14 16:05:37 · 93 阅读 · 0 评论 -
计算面积
[code="java"] /** * 计算面积 * * @param vec * @return */ public static Vector getArea(Vector vec) { Vector result = new Vector(); ArrayList al = null; if (vec != null && vec.si...2012-09-14 16:12:03 · 141 阅读 · 0 评论 -
写txt文件
[code="java"] /** * 写文件 * * @param list * @param dstPathName */ public static void writerText(List list, String dstPathName) { File file = new File(dstPathName); // 存在就覆盖,不存在就...原创 2012-09-14 16:18:40 · 105 阅读 · 0 评论