zoukankan      html  css  js  c++  java
  • 特殊方式写的文件格式读取到内存(知道用什么内存存的数据用什么内存来接)

    package com;
    
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.util.Map;
    import java.util.Map.Entry;
    
    public class E {
    
        public static void main(String[] args) throws IOException, ClassNotFoundException {
            String sf = "C:\Users\AOC\ewwq\N2\.mc\mcInfo.mc";
            syccc(sf);
            System.out.println("---------------------------------------");
            sf = "C:\Users\AOC\ewwq\N3\.mc\mcInfo.mc";
            syccc(sf);
        }
    
        public static Map<String, Map<String, String>> syccc(String sf) throws IOException, ClassNotFoundException {
            FileInputStream fin = new FileInputStream(sf);
            ObjectInputStream obs = new ObjectInputStream(fin);
            Map<String, Map<String, String>> map = (Map<String, Map<String, String>>) obs.readObject();
            for (Entry<String, Map<String, String>> mapec : map.entrySet()) {
                System.out.println(mapec.getKey() + "---------------" + mapec.getValue());
            }
            return map;
        }
    }
  • 相关阅读:
    模拟22
    模拟21
    模拟20
    模拟19
    晚测11
    Redis 内存模型
    Redis AOF重写
    基础省选题选做
    八年级上 期中考试祭
    P2049 魔术棋子 题解
  • 原文地址:https://www.cnblogs.com/zhangjiangbin/p/11558448.html
Copyright © 2011-2022 走看看