zoukankan      html  css  js  c++  java
  • java i/o

    复习一遍i/o

    读取文件一般分为字节流和字符流,java I/O就分为两大类

         分别是 InputStream/OutputStream   Reader/Writer

    字节流

     1 文件读写   FileInputStream/FileOutputStream
     2 内存读写   ByteArrayInputStream/ByteArrayOutputStream
     3 控制台读写  Scanner/BufferedReader
     4 对象读写    ObjectInputStream/ObjectOutputStream
     5 piped 管道  PipedInputStream/PipedOutputStream

    字符流

     Reader->FileReader->BufferedReader


    字节流转化成字符流
    InputStreamReader / OutputStreamReader
    字节一般可以完成拷贝的任务
    如果涉及到处理文本,就用字符流
  • 相关阅读:
    重装Win10系统的非常简单的操作教程
    Python
    Delphi
    Libs
    Windows Server
    Windows Server
    Delphi
    Delphi
    Delphi
    Delphi
  • 原文地址:https://www.cnblogs.com/skiz/p/2662647.html
Copyright © 2011-2022 走看看