java基礎io流——配角也風流(不求甚解)

本章簡單介紹幾個常見的io流派生弓叛。

1:數(shù)據(jù)操作流(操作基本類型數(shù)據(jù)的流)(理解)

(1)可以操作基本類型的數(shù)據(jù)
(2)流對象名稱    
    DataInputStream
    DataOutputStream

代碼示例:

private static void read() throws IOException {
        // DataInputStream(InputStream in)
        // 創(chuàng)建數(shù)據(jù)輸入流對象
        DataInputStream dis = new DataInputStream(
                new FileInputStream("dos.txt"));

        // 讀數(shù)據(jù)
        byte b = dis.readByte();
        short s = dis.readShort();
        int i = dis.readInt();
        long l = dis.readLong();
        float f = dis.readFloat();
        double d = dis.readDouble();
        char c = dis.readChar();
        boolean bb = dis.readBoolean();

        // 釋放資源
        dis.close();

        System.out.println(b);
        System.out.println(s);
        System.out.println(i);
        System.out.println(l);
        System.out.println(f);
        System.out.println(d);
        System.out.println(c);
        System.out.println(bb);

    }

    private static void write()throws IOException {
        DataOutputStream dos = new DataOutputStream(new FileOutputStream("dos.txt"));
        dos.writeByte(10);
        dos.writeShort(100);
        dos.writeInt(1000);
        dos.writeLong(10000);
        dos.writeFloat(12.34F);
        dos.writeDouble(12.56);
        dos.writeChar('a');
        dos.writeBoolean(true);
        dos.close();
    }

2:內(nèi)存操作流(理解)

用于處理臨時存儲信息的璃弄,程序結束哥捕,數(shù)據(jù)就從內(nèi)存中消失牧抽。

(1)有些時候我們操作完畢后,未必需要產(chǎn)生一個文件遥赚,就可以使用內(nèi)存操作流扬舒。
(2)三種
    A:ByteArrayInputStream,ByteArrayOutputStream
    B:CharArrayReader,CharArrayWriter
    C:StringReader,StringWriter

代碼示例:

//ByteArray
    private static void fun1() throws IOException {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        // 寫數(shù)據(jù)
        for (int x = 0; x < 10; x++) {
            bos.write(("hello" + x).getBytes());
        }
        byte[] bytes = bos.toByteArray();
        ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
        int by = 0;
        while ((by = bis.read()) != -1) {
            System.out.print((char) by);
        }
    }
    //CharArray
    private static void fun2() throws IOException {
        CharArrayWriter caw = new CharArrayWriter();
        caw.write("hello");
        char[] chars =caw.toCharArray();
        CharArrayReader car = new CharArrayReader(chars);

        //car.read(chars);
        System.out.println(chars);

        int len = 0;
        while ((len = car.read()) != -1) {
            System.out.print((char)len);
        }
    }
    //String
    private static void fun3() throws IOException {
        StringWriter sw = new StringWriter();
        sw.write("hello");

        StringReader sr = new StringReader(sw.toString());
        int len = 0;
        while ((len = sr.read()) != -1) {
            System.out.print((char)len);
        }
    }

注:查看源碼,其close并不起作用凫佛,所以無需關閉呼巴。

3:打印流(掌握)

    (1)字節(jié)打印流,字符打印流
    (2)特點:
        A:只操作目的地,不操作數(shù)據(jù)源
        B:可以操作任意類型的數(shù)據(jù)
        C:如果啟用了自動刷新御蒲,在調(diào)用println()方法的時候,能夠換行并刷新
        D:可以直接操作文件
            問題:哪些流可以直接操作文件呢?
            看API诊赊,如果其構造方法能夠同時接收File和String類型的參數(shù)厚满,一般都是可以直接操作文件的
    (3)復制文本文件
        BufferedReader br = new BufferedReader(new FileReader("a.txt"));
        PrintWriter pw = new PrintWriter(new FileWriter("b.txt"),true);
        
        String line = null;
        while((line=br.readLine())!=null) {
            pw.println(line);
        }
        
        pw.close();
        br.close();

PrintStream是OutputStream的子類,PrintWriter是Writer的子類碧磅,兩者處于對等的位置上碘箍,所以它們的API是非常相似的遵馆。

區(qū)別無非一個是字節(jié)打印流,一個是字符打印流丰榴。更多的應用會在以后詳細擴展货邓。

需要注意:
字節(jié)打印流還是標準輸出流的對象哦。

4:標準輸入輸出流(理解)

    (1)System類下面有這樣的兩個字段
        in 標準輸入流
        out 標準輸出流
    (2)三種鍵盤錄入方式
        A:main方法的args接收參數(shù)
        B:System.in通過BufferedReader進行包裝
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        C:Scanner
            Scanner sc = new Scanner(System.in);
    (3)輸出語句的原理和如何使用字符流輸出數(shù)據(jù)
        A:原理
            System.out.println("helloworld");
            
            PrintStream ps = System.out;
            ps.println("helloworld");
        B:把System.out用字符緩沖流包裝一下使用
            BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

代碼示例:

在scanner沒有出現(xiàn)以前四濒,我們是這樣鍵盤錄入的:

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("請輸入名字:");
        String data =br.readLine();
        System.out.println(data);
        System.out.println("請輸入數(shù)字:");
        String i = br.readLine();
        System.out.println(Integer.parseInt(i));

5:隨機訪問流(理解)

(1)可以按照文件指針的位置寫數(shù)據(jù)和讀數(shù)據(jù)换况。
    (2)案例:
        A:寫數(shù)據(jù)
        B:讀數(shù)據(jù)
        C:獲取和改變文件指針的位置

代碼示例:

/*
 * 隨機訪問流:
 *      RandomAccessFile類不屬于流,是Object類的子類盗蟆。
 *      但它融合了InputStream和OutputStream的功能戈二。
 *      支持對文件的隨機訪問讀取和寫入。
 *
 * public RandomAccessFile(String name,String mode):第一個參數(shù)是文件路徑喳资,第二個參數(shù)是操作文件的模式觉吭。
 *      模式有四種,我們最常用的一種叫"rw",這種方式表示我既可以寫數(shù)據(jù)仆邓,也可以讀取數(shù)據(jù)鲜滩。
 訪問模式:
 "r" 以只讀方式打開。調(diào)用結果對象的任何 write 方法都將導致拋出 IOException节值。  
"rw" 打開以便讀取和寫入徙硅。如果該文件尚不存在,則嘗試創(chuàng)建該文件察署。  
"rws" 打開以便讀取和寫入闷游,對于 "rw",還要求對文件的內(nèi)容或元數(shù)據(jù)的每個更新都同步寫入到底層存儲設備贴汪。  
"rwd" 打開以便讀取和寫入脐往,對于 "rw",還要求對文件內(nèi)容的每個更新都同步寫入到底層存儲設備扳埂。 
一般使用rw模式业簿。
 
 */
public class RandomAccessFileDemo {

    public static void main(String[] args) throws IOException {
        // write();
        read();
    }

    private static void read() throws IOException {
        // 創(chuàng)建隨機訪問流對象
        RandomAccessFile raf = new RandomAccessFile("raf.txt", "rw");

        int i = raf.readInt();
        System.out.println(i);
        // 該文件指針可以通過 getFilePointer方法讀取,并通過 seek 方法設置阳懂。
        System.out.println("當前文件的指針位置是:" + raf.getFilePointer());

        char ch = raf.readChar();
        System.out.println(ch);
        System.out.println("當前文件的指針位置是:" + raf.getFilePointer());

        String s = raf.readUTF();
        System.out.println(s);
        System.out.println("當前文件的指針位置是:" + raf.getFilePointer());

        // 我不想重頭開始了梅尤,我就要讀取a,怎么辦呢?
        raf.seek(4);
        ch = raf.readChar();
        System.out.println(ch);
    }

    private static void write() throws IOException {
        // 創(chuàng)建隨機訪問流對象
        RandomAccessFile raf = new RandomAccessFile("raf.txt", "rw");

        // 怎么玩呢?
        raf.writeInt(100);
        raf.writeChar('a');
        raf.writeUTF("中國");

        raf.close();
    }
}

6:合并流(理解)

    (1)把多個輸入流的數(shù)據(jù)寫到一個輸出流中岩调。
    (2)構造方法:
        A:SequenceInputStream(InputStream s1, InputStream s2) 
        B:SequenceInputStream(Enumeration<? extends InputStream> e)

合并復制1:

/*復制:
 * 以前的操作:
 * a.txt -- b.txt
 * c.txt -- d.txt
 *
 * 現(xiàn)在想要:
 * a.txt+b.txt -- ab.txt
 */
public class SequenceInputStreamDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream f1 = new FileInputStream("a.txt");
        FileInputStream f2 = new FileInputStream("b.txt");
        SequenceInputStream sis = new SequenceInputStream(f1,f2);

        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("ab.txt"));
        byte[] bytes = new byte[1024];
        int len = 0 ;
        while ((len = sis.read(bytes)) != -1) {
            bos.write(bytes,0,len);
        }

        bos.close();
        sis.close();

    }
}

合并復制2:

/*
 * 以前的操作:
 * a.txt -- b.txt
 * c.txt -- d.txt
 * e.txt -- f.txt
 *
 * 現(xiàn)在想要:
 * a.txt+b.txt+c.txt -- abc.txt
 */
public class SequenceInputStreamDemo2 {
    public static void main(String[] args) throws IOException {
        Vector<InputStream> v = new Vector<>();
        InputStream s1 = new FileInputStream("a.txt");
        InputStream s2 = new FileInputStream("b.txt");
        InputStream s3 = new FileInputStream("c.txt");
        v.add(s1);
        v.add(s2);
        v.add(s3);
        Enumeration<InputStream> en = v.elements();
        SequenceInputStream sis = new SequenceInputStream(en);
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("abc.txt"));
        byte[] bytes = new byte[1024];
        int len = 0 ;
        while ((len = sis.read(bytes)) != -1) {
            bos.write(bytes,0,len);
        }

        bos.close();
        sis.close();


    }
}

7:序列化流(理解)

    (1)可以把對象寫入文本文件或者在網(wǎng)絡中傳輸
    (2)如何實現(xiàn)序列化呢?
        讓被序列化的對象所屬類實現(xiàn)序列化接口巷燥。
        該接口是一個標記接口。沒有功能需要實現(xiàn)号枕。
    (3)注意問題:
        把數(shù)據(jù)寫到文件后缰揪,在去修改類會產(chǎn)生一個問題。
        如何解決該問題呢?
            在類文件中葱淳,給出一個固定的序列化id值钝腺。
            而且抛姑,這樣也可以解決黃色警告線問題
    (4)面試題:
        什么時候序列化? 
        如何實現(xiàn)序列化?
        什么是反序列化?

代碼示例:

Person.java

/*
 * NotSerializableException:未序列化異常
 *
 * 類通過實現(xiàn) java.io.Serializable 接口以啟用其序列化功能。未實現(xiàn)此接口的類將無法使其任何狀態(tài)序列化或反序列化艳狐。
 * 該接口居然沒有任何方法定硝,類似于這種沒有方法的接口被稱為標記接口。
 *
 * java.io.InvalidClassException:
 * cn.itcast_07.Person; local class incompatible:
 * stream classdesc serialVersionUID = -2071565876962058344,
 * local class serialVersionUID = -8345153069362641443
 *
 * 為什么會有問題呢?
 *      Person類實現(xiàn)了序列化接口毫目,那么它本身也應該有一個標記值蔬啡。
 *      這個標記值假設是100。
 *      開始的時候:
 *      Person.class -- id=100
 *      wirte數(shù)據(jù): oos.txt -- id=100
 *      read數(shù)據(jù): oos.txt -- id=100
 *
 *      現(xiàn)在:
 *      Person.class -- id=200
 *      wirte數(shù)據(jù): oos.txt -- id=100
 *      read數(shù)據(jù): oos.txt -- id=100
 *
 * 我們要知道的是:
 *      看到類實現(xiàn)了序列化接口的時候蒜茴,要想解決黃色警告線問題星爪,就可以自動產(chǎn)生一個序列化id值。
 *      而且產(chǎn)生這個值以后粉私,我們對類進行任何改動顽腾,它讀取以前的數(shù)據(jù)是沒有問題的。
 *
 * 注意:
 *      我一個類中可能有很多的成員變量诺核,有些我不想進行序列化抄肖。請問該怎么辦呢?
 *      使用transient關鍵字聲明不需要序列化的成員變量
 */
public class Person implements Serializable {
    private static final long serialVersionUID = 5816344743154801933L;
    private String name;

    // private int age;

    private transient int age;

    // int age;

    public Person() {
        super();
    }

    public Person(String name, int age) {
        super();
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Person [name=" + name + ", age=" + age + "]";
    }
}

ObjectStreamDemo.java

/*
 * 序列化流:把對象按照流一樣的方式存入文本文件或者在網(wǎng)絡中傳輸。對象 -- 流數(shù)據(jù)(ObjectOutputStream)
 * 反序列化流:把文本文件中的流對象數(shù)據(jù)或者網(wǎng)絡中的流對象數(shù)據(jù)還原成對象窖杀。流數(shù)據(jù) -- 對象(ObjectInputStream)
 */
public class ObjectStreamDemo {
    public static void main(String[] args) throws IOException,
            ClassNotFoundException {
        // 由于我們要對對象進行序列化漓摩,所以我們先自定義一個類
        // 序列化數(shù)據(jù)其實就是把對象寫到文本文件
        // write();

        read();
    }

    private static void read() throws IOException, ClassNotFoundException {
        // 創(chuàng)建反序列化對象
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream(
                "oos.txt"));

        // 還原對象
        Object obj = ois.readObject();

        // 釋放資源
        ois.close();

        // 輸出對象
        System.out.println(obj);
    }

    private static void write() throws IOException {
        // 創(chuàng)建序列化流對象
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(
                "oos.txt"));

        // 創(chuàng)建對象
        Person p = new Person("林青霞", 27);

        // public final void writeObject(Object obj)
        oos.writeObject(p);

        // 釋放資源
        oos.close();
    }
}

8:Properties(理解)

    (1)是一個集合類,Hashtable的子類
    (2)特有功能
        A:public Object setProperty(String key,String value)
        B:public String getProperty(String key)
        C:public Set<String> stringPropertyNames()
    (3)和IO流結合的方法
        把鍵值對形式的文本文件內(nèi)容加載到集合中
        public void load(Reader reader)
        public void load(InputStream inStream)

        把集合中的數(shù)據(jù)存儲到文本文件中
        public void store(Writer writer,String comments)
        public void store(OutputStream out,String comments)
    (4)案例:
        寫一個程序?qū)崿F(xiàn)控制猜數(shù)字小游戲程序不能玩超過5次(用Properties控制玩的次數(shù))

Properties當做map來用:

Properties prop = new Properties();

        // 添加元素
        prop.put("it002", "hello");
        prop.put("it001", "world");
        prop.put("it003", "java");


        // 遍歷集合
        Set<Object> set = prop.keySet();
        for (Object key : set) {
            Object value = prop.get(key);
            System.out.println(key + "---" + value);
        }

properties的特殊功能:

// 創(chuàng)建集合對象
        Properties prop = new Properties();

        // 添加元素
        prop.setProperty("張三", "30");
        prop.setProperty("李四", "40");
        prop.setProperty("王五", "50");

        // public Set<String> stringPropertyNames():獲取所有的鍵的集合
        Set<String> set = prop.stringPropertyNames();
        for (String key : set) {
            String value = prop.getProperty(key);
            System.out.println(key + "---" + value);
        }

properties和io流的聯(lián)合:

private static void myStore() throws IOException {
        // 創(chuàng)建集合對象
        Properties prop = new Properties();

        prop.setProperty("林青霞", "27");
        prop.setProperty("武鑫", "30");
        prop.setProperty("劉曉曲", "18");

        //public void store(Writer writer,String comments):把集合中的數(shù)據(jù)存儲到文件
        Writer w = new FileWriter("name1.properties");
        prop.store(w, null);//第二個參數(shù)是列表的描述
        w.close();
    }

    private static void myLoad() throws IOException {
        Properties prop = new Properties();

        // public void load(Reader reader):把文件中的數(shù)據(jù)讀取到集合中
        // 注意:這個文件的數(shù)據(jù)必須是鍵值對形式
        Reader r = new FileReader("name1.properties");
        prop.load(r);
        r.close();

        System.out.println("prop:" + prop);
    }

案例猜數(shù)字游戲:

游戲源碼:

public class GuessNumber {
    private GuessNumber() {
    }

    public static void start() {
        // 產(chǎn)生一個隨機數(shù)
        int number = (int) (Math.random() * 100) + 1;

        // 定義一個統(tǒng)計變量
        int count = 0;

        while (true) {
            // 鍵盤錄入一個數(shù)據(jù)
            Scanner sc = new Scanner(System.in);
            System.out.println("請輸入數(shù)據(jù)(1-100):");
            int guessNumber = sc.nextInt();

            count++;

            // 判斷
            if (guessNumber > number) {
                System.out.println("你猜的數(shù)據(jù)" + guessNumber + "大了");
            } else if (guessNumber < number) {
                System.out.println("你猜的數(shù)據(jù)" + guessNumber + "小了");
            } else {
                System.out.println("恭喜你入客," + count + "次就猜中了");
                break;
            }
        }
    }
}

用properties將游戲次數(shù)記錄在文本中:

public class PropertiesTest2 {
    public static void main(String[] args) throws IOException {


        Reader reader =new FileReader("count.properties");
        Properties pro = new Properties();
        pro.load(reader);
        reader.close();

        String count =pro.getProperty("count");
        int num =Integer.parseInt(count);
        if (num>=3){
            System.out.println("您已經(jīng)免費玩過三次了管毙,再玩請付費!");
        }
        else {
            num++;
            pro.setProperty("count",String.valueOf(num));
            Writer writer = new FileWriter("count.properties");
            pro.store(writer,null);
            writer.close();
            GuessNumber.start();
        }

    }
}

一般的單機版游戲桌硫,都會有.properties文件來記錄本地游戲狀態(tài)夭咬。當然實際情況中這個文件是加密的。在后面的框架學習中铆隘,我們有時候會數(shù)據(jù)庫的配置放到.properties文件中并且加密卓舵。

9:NIO(了解)

    (1)JDK4出現(xiàn)的NIO,對以前的IO操作進行了優(yōu)化膀钠,提供了效率掏湾。但是大部分我們看到的還是以前的IO
    (2)JDK7的NIO的使用  
        Path:路徑
        Paths:通過靜態(tài)方法返回一個路徑
        Files:提供了常見的功能
            復制文本文件
            把集合中的數(shù)據(jù)寫到文本文件

代碼示例:新型復制:

/*
 * nio包在JDK4出現(xiàn),提供了IO流的操作效率肿嘲。
 *
 * JDK7的之后的nio:
 * Path:路徑
 * Paths:有一個靜態(tài)方法返回一個路徑
 *      public static Path get(URI uri)
 * Files:提供了靜態(tài)方法供我們使用
 *      public static long copy(Path source,OutputStream out):復制文件
 *      public static Path write(Path path,Iterable<? extends CharSequence> lines,Charset cs,OpenOption... options)
 */
public class NIODemo {
    public static void main(String[] args) throws IOException {
        //復制
        //Files.copy(Paths.get("a.txt"),new FileOutputStream("newa.txt"));

        ArrayList<String> array = new ArrayList<String>();
        array.add("hello");
        array.add("world");
        array.add("java");
        Files.write(Paths.get("f.txt"),array, Charset.defaultCharset());
    }
}

現(xiàn)在jdk已經(jīng)出到9了融击,io流也有了更多的變化。給我最大的感受是操作更方便了雳窟。有時間會整理一下java8砚嘴,java9的一些新特性。

io流的基礎回顧就告一段落了,淺嘗輒止际长。無論是做學問,做科研都不可能一下子做到很全兴泥,很好工育。循序漸進,實踐中慢慢總結搓彻。io流用到的地方很多如绸,上傳下載,傳輸旭贬,設計模式等怔接。基礎打扎實了稀轨,才能玩更高端的扼脐。

以上是本人學習筆記整理,重溫java經(jīng)典奋刽,歡迎各位同道中人批評指正瓦侮。

源碼碼云地址:
https://gitee.com/stefanpy/java

夢回io流完整目錄:

java基礎io流——File告白(重溫經(jīng)典)

java基礎io流——OutputStream和InputStream的故事(溫故知新)

java基礎io流——字符流的變革(深入淺出)

java基礎io流——配角也風流(不求甚解)

最后編輯于
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市佣谐,隨后出現(xiàn)的幾起案子肚吏,更是在濱河造成了極大的恐慌,老刑警劉巖狭魂,帶你破解...
    沈念sama閱讀 218,451評論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件罚攀,死亡現(xiàn)場離奇詭異,居然都是意外死亡雌澄,警方通過查閱死者的電腦和手機斋泄,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,172評論 3 394
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來掷伙,“玉大人是己,你說我怎么就攤上這事∪喂瘢” “怎么了卒废?”我有些...
    開封第一講書人閱讀 164,782評論 0 354
  • 文/不壞的土叔 我叫張陵,是天一觀的道長宙地。 經(jīng)常有香客問我摔认,道長,這世上最難降的妖魔是什么宅粥? 我笑而不...
    開封第一講書人閱讀 58,709評論 1 294
  • 正文 為了忘掉前任参袱,我火速辦了婚禮,結果婚禮上,老公的妹妹穿的比我還像新娘抹蚀。我一直安慰自己剿牺,他們只是感情好,可當我...
    茶點故事閱讀 67,733評論 6 392
  • 文/花漫 我一把揭開白布环壤。 她就那樣靜靜地躺著晒来,像睡著了一般。 火紅的嫁衣襯著肌膚如雪郑现。 梳的紋絲不亂的頭發(fā)上湃崩,一...
    開封第一講書人閱讀 51,578評論 1 305
  • 那天,我揣著相機與錄音接箫,去河邊找鬼攒读。 笑死,一個胖子當著我的面吹牛辛友,可吹牛的內(nèi)容都是我干的薄扁。 我是一名探鬼主播,決...
    沈念sama閱讀 40,320評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼瞎领,長吁一口氣:“原來是場噩夢啊……” “哼泌辫!你這毒婦竟也來了?” 一聲冷哼從身側響起九默,我...
    開封第一講書人閱讀 39,241評論 0 276
  • 序言:老撾萬榮一對情侶失蹤震放,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后驼修,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體殿遂,經(jīng)...
    沈念sama閱讀 45,686評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,878評論 3 336
  • 正文 我和宋清朗相戀三年乙各,在試婚紗的時候發(fā)現(xiàn)自己被綠了纯续。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片梆暖。...
    茶點故事閱讀 39,992評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡峻厚,死狀恐怖窜司,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情蹲坷,我是刑警寧澤驶乾,帶...
    沈念sama閱讀 35,715評論 5 346
  • 正文 年R本政府宣布,位于F島的核電站循签,受9級特大地震影響级乐,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜县匠,卻給世界環(huán)境...
    茶點故事閱讀 41,336評論 3 330
  • 文/蒙蒙 一风科、第九天 我趴在偏房一處隱蔽的房頂上張望撒轮。 院中可真熱鬧,春花似錦贼穆、人聲如沸题山。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,912評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽臀蛛。三九已至,卻和暖如春崖蜜,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背客峭。 一陣腳步聲響...
    開封第一講書人閱讀 33,040評論 1 270
  • 我被黑心中介騙來泰國打工豫领, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人舔琅。 一個月前我還...
    沈念sama閱讀 48,173評論 3 370
  • 正文 我出身青樓等恐,卻偏偏與公主長得像,于是被迫代替她去往敵國和親备蚓。 傳聞我的和親對象是個殘疾皇子课蔬,可洞房花燭夜當晚...
    茶點故事閱讀 44,947評論 2 355

推薦閱讀更多精彩內(nèi)容

  • Spring Cloud為開發(fā)人員提供了快速構建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務發(fā)現(xiàn)郊尝,斷路器二跋,智...
    卡卡羅2017閱讀 134,657評論 18 139
  • 概述 java.io 包幾乎包含了所有操作輸入、輸出需要的類流昏。所有這些流類代表了輸入源和輸出目標扎即。java.io ...
    Steven1997閱讀 9,194評論 1 25
  • 一、概念 Android的消息機制主要是指Handler的運行機制以及Handler所附帶的MessageQueu...
    TomyZhang閱讀 317評論 0 0
  • 早起的鳥兒有蟲吃况凉,迎來元氣滿滿的一天谚鄙,我一點都不困
    401a1ed5d2be閱讀 228評論 0 1
  • 你們之所以說錢不重要,是因為你都擁有了別人想要卻得不到的東西刁绒。 你的排除萬難闷营,別人輕而易舉 有的人負重前行,有的人...
    愿你寧靜致遠閱讀 120評論 0 0