Java 日看一类(4)之IO包中的BufferedReader类

Java IO之:BufferedReader(超详细解析,使用方法说明) Java IO操作——BufferedReader(缓冲区读取内容,避免中文乱码) 要点: 掌握BufferedReader类的使用 掌握键盘输入的基本形式 Buffer:表示缓冲区的。之前的StringBuffer,缓冲区中的内容可以更改,可以提高效率。 如果想接收任意长度的数据,而且避免乱码的产生,就可以使用BufferedReader。 public class BufferedReader extends Reader 因为输入的数据有可能出现中文,所以此处使用字符流完成 BufferedReade 阅读详情

所引入的包和继承的类:

import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

该类继承自Reader类




类的使用注释:

/**
 * Reads text from a character-input stream, buffering characters so as to
 * provide for the efficient reading of characters, arrays, and lines.
 *
 * <p> The buffer size may be specified, or the default size may be used.  The
 * default is large enough for most purposes.
 *
 * <p> In general, each read request made of a Reader causes a corresponding
 * read request to be made of the underlying character or byte stream.  It is
 * therefore advisable to wrap a BufferedReader around any Reader whose read()
 * operations may be costly, such as FileReaders and InputStreamReaders.  For
 * example,
 *
 * <pre>
 * BufferedReader in
 *   = new BufferedReader(new FileReader("foo.in"));
 * </pre>
 *
 * will buffer the input from the specified file.  Without buffering, each
 * invocation of read() or readLine() could cause bytes to be read from the
 * file, converted into characters, and then returned, which can be very
 * inefficient.
 *
 * <p> Programs that use DataInputStreams for textual input can be localized by
 * replacing each DataInputStream with an appropriate BufferedReader.
 *
 * @see FileReader
 * @see InputStreamReader
 * @see java.nio.file.Files#newBufferedReader
 *
 * @author      Mark Reinhold
 * @since       JDK1.1
 */


大意如下:

从一个输入的字符流中读取文本,为字符、数组、一行文本的高效读取提供字符缓冲功能。

缓冲区的大小可能是特殊设定值,可能是使用默认的大小。默认的大小已经足够解决大部分问题。

一般情况下,每一个read请求由一个Reader类发起,使底层进行对字节流或byte流执行相应的读取请求。

对一些read()函数开销较大的的Reader类,(例如:FileReaders和InputStreamReaders)使用BufferedReader类进行封装是很明智的。

引例:

 BufferedReader in  = new BufferedReader(new FileReader("foo.in"));

如果没由进行缓冲,对read()和readline()调用会直接从文件中读取一次byte数据,转换成字符格式并返回,这是十分不明智的做法。

程序对文本数据使用DataInputStream时,在合适的情况下可以局部替换DataInputStream为BufferedReader




 BufferedReader类含有十一个成员变量:

内部包含的Reader对象:

private Reader in;

缓冲区数组:

private char cb[];

缓冲区数组的标识符:

private int nChars, nextChar;

无效数据标识:

private static final int INVALIDATED = -2;

“未标记”标示:

private static final int UNMARKED = -1;

被标记字符的位置:

private int markedChar = UNMARKED;

预读取大小限制(每次更新缓冲需保存的字符数量限制):

private int readAheadLimit = 0; 
 /* Valid only when markedChar > 0 */

是否跳过下个换行符:

private boolean skipLF = false;

是否跳过所有的换行符:

private boolean markedSkipLF = false;

默认缓冲区大小:

private static int defaultCharBufferSize = 8192;

默认预计行长度:

private static int defaultExpectedLineLength = 80;




含有十五个方法:

构造函数(自定义缓冲区大小):(传入一个Reader类和int值)

public BufferedReader(Reader in, int sz) {
    super(in);
    if (sz <= 0)
        throw new IllegalArgumentException("Buffer size <= 0");
    this.in = in;
    cb = new char[sz];
    nextChar = nChars = 0;
}

构造函数(默认缓冲区大小):

public BufferedReader(Reader in) {
    this(in, defaultCharBufferSize);
}

判定流的有效性:

private void ensureOpen() throws IOException {
    if (in == null)
        throw new IOException("Stream closed");
}

缓冲区装填:

private void fill() throws IOException {
    int dst;//更新缓冲区开始位置的标识
    if (markedChar <= UNMARKED) {//判定是否存在标记
        /* No mark */
        dst = 0;//不存在标记,将标识移至缓冲区头部
    } else {
        /* Marked */
        int delta = nextChar - markedChar;//下个未读取字符到上一个标记位置的距离
        if (delta >= readAheadLimit) {//需要保存的字符量预读取限制
            /* Gone past read-ahead limit: Invalidate mark */
            markedChar = INVALIDATED;//无效标记
            readAheadLimit = 0;//限制重置
            dst = 0;//指向缓冲头
        } else {
            if (readAheadLimit <= cb.length) {//预读取限制小于缓冲区大小
                /* Shuffle in the current buffer */
                System.arraycopy(cb, markedChar, cb, 0, delta);//将标记至当前读取位置的数据挪至缓冲区头部
                markedChar = 0;//标记位置为0
                dst = delta;//更新位置为下个要读取字节
            } else {
                /* Reallocate buffer to accommodate read-ahead limit */
                char ncb[] = new char[readAheadLimit];//创建新缓冲区,大小为预读取限制大小
                System.arraycopy(cb, markedChar, ncb, 0, delta);//将原缓冲区中的数据转移
                cb = ncb;
                markedChar = 0;
                dst = delta;
            }
            nextChar = nChars = delta;//修改读取指针的指向和有效字符数
        }
    }

    int n;
    do {
        n = in.read(cb, dst, cb.length - dst);//填满缓冲区
    } while (n == 0);//当实际读取字节数为0时继续读取
    if (n > 0) {
        nChars = dst + n;//读取成功修改有效字节数
        nextChar = dst;//修改读取指针指向
    }
}

从缓冲区中读取数据:

public int read() throws IOException {
    synchronized (lock) {//线程枷锁
        ensureOpen();
        for (;;) {
            if (nextChar >= nChars) {//读取指针超出有效字符数
                fill();//更新缓冲区
                if (nextChar >= nChars)//仍超出有效字符数
                    return -1;//程序报错返回
            }
            if (skipLF) {//设定为跳过下个换行符
                skipLF = false;//标记重置
                if (cb[nextChar] == '\n') {//下个字符为换行符
                    nextChar++;
                    continue;//直接跳过并继续循环
                }
            }
            return cb[nextChar++];//返回读取值
        }
    }
}

缓冲区大批量读取(内部私有):

private int read1(char[] cbuf, int off, int len) throws IOException {
    if (nextChar >= nChars) {//读取指针超出目前有效字符数
        /* If the requested length is at least as large as the buffer, and
           if there is no mark/reset activity, and if line feeds are not
           being skipped, do not bother to copy the characters into the
           local buffer.  In this way buffered streams will cascade
           harmlessly. */
        if (len >= cb.length && markedChar <= UNMARKED && !skipLF) {//需读取长度大于缓冲区大小且不存在标记且不需要跳过下个换行符
            return in.read(cbuf, off, len);//直接从Reader中读取,不经过缓冲区
        }
        fill();
    }
    if (nextChar >= nChars) return -1;//刷新后仍超出则程序报错
    if (skipLF) {
        skipLF = false;
        if (cb[nextChar] == '\n') {
            nextChar++;
            if (nextChar >= nChars)
                fill();
            if (nextChar >= nChars)
                return -1;
        }
    }
    int n = Math.min(len, nChars - nextChar);//取需读取长度和缓冲区剩余有效长度的较小值
    System.arraycopy(cb, nextChar, cbuf, off, n);
    nextChar += n;//更新读取指针
    return n;//返回有效读取长度
}

缓冲区批量读取(公有):

public int read(char cbuf[], int off, int len) throws IOException {
    synchronized (lock) {// 线程枷锁
        ensureOpen();
        if ((off < 0) || (off > cbuf.length) || (len < 0) ||
            ((off + len) > cbuf.length) || ((off + len) < 0)) {//读取指针小于0或需读取长度大于传入数组长度或需读取长度小于0或读取指针预需读取长度相加大于数组长度或相加小于0
            throw new IndexOutOfBoundsException();//数组越界
        } else if (len == 0) {//读取长度为0
            return 0;
        }

        int n = read1(cbuf, off, len);//调用上个函数,得到实际读取长度
        if (n <= 0) return n;//实际读取长度小于等于0,直接返回(返回0或报错)
        while ((n < len) && in.ready()) {//当n小于需读取长度且Reader流准备好时
            int n1 = read1(cbuf, off + n, len - n);//直接从Reader流中读取剩余所需的数据
            if (n1 <= 0) break;
            n += n1;
        }
        return n;
    }
}

行文本读取(当行文本过大时会创建一个字符串缓冲区单独储存):

String readLine(boolean ignoreLF) throws IOException {
    StringBuffer s = null;//开个字符串缓冲区
    int startChar;//字符指针

    synchronized (lock) {
        ensureOpen();
        boolean omitLF = ignoreLF || skipLF;//确认这一行读取是否需要读取换行符

    bufferLoop:
        for (;;) {

            if (nextChar >= nChars)
                fill();
            if (nextChar >= nChars) { /* EOF */
                if (s != null && s.length() > 0)//字符串缓冲区不为空且长度大于0
                    return s.toString();//返回字符串缓冲区中的字符串
                else
                    return null;
            }
            boolean eol = false;//句尾标识符
            char c = 0;
            int i;

            /* Skip a leftover '\n', if necessary */
            if (omitLF && (cb[nextChar] == '\n'))
                nextChar++;
            skipLF = false;
            omitLF = false;

        charLoop:
            for (i = nextChar; i < nChars; i++) {//遍历缓冲区中剩余数据
                c = cb[i];
                if ((c == '\n') || (c == '\r')) {//数据为换行或回车
                    eol = true;
                    break charLoop;//跳出字符循环
                }
            }

            startChar = nextChar;
            nextChar = i;

            if (eol) {//句子结束
                String str;
                if (s == null) {//字符串缓冲区为空则直接从缓冲区中读取
                    str = new String(cb, startChar, i - startChar);
                } else {
                    s.append(cb, startChar, i - startChar); //字符串缓冲区从缓冲区中读取数据
                    str = s.toString();
                }
                nextChar++;
                if (c == '\r') {//若charloop因回车中断,跳过下一个换行符
                    skipLF = true;
                }
                return str;
            }

            if (s == null)
                s = new StringBuffer(defaultExpectedLineLength);//创建默认大小缓冲区
            s.append(cb, startChar, i - startChar);//读取数据进缓冲区
        }
    }
}

默认不跳过换行读取:

public String readLine() throws IOException {
    return readLine(false);
}

跳过后续的字符(在缓冲区中操作):

public long skip(long n) throws IOException {
    if (n < 0L) {
        throw new IllegalArgumentException("skip value is negative");
    }
    synchronized (lock) {
        ensureOpen();
        long r = n;
        while (r > 0) {
            if (nextChar >= nChars)
                fill();
            if (nextChar >= nChars) /* EOF */
                break;
            if (skipLF) {
                skipLF = false;
                if (cb[nextChar] == '\n') {
                    nextChar++;
                }
            }
            long d = nChars - nextChar;//缓冲区剩余有效长度
            if (r <= d) {
                nextChar += r;
                r = 0;
                break;
            }
            else {
                r -= d;
                nextChar = nChars;
            }
        }
        return n - r;//返回实际跳过长度
    }
}

检测当前状态是否能读取:

public boolean ready() throws IOException {
    synchronized (lock) {
        ensureOpen();

        /*
         * If newline needs to be skipped and the next char to be read
         * is a newline character, then just skip it right away.
         */
        if (skipLF) {
            /* Note that in.ready() will return true if and only if the next
             * read on the stream will not block.
             */
            if (nextChar >= nChars && in.ready()) {
                fill();
            }
            if (nextChar < nChars) {
                if (cb[nextChar] == '\n')
                    nextChar++;
                skipLF = false;
            }
        }
        return (nextChar < nChars) || in.ready();
    }
}

是否支持标记操作:

public boolean markSupported() {
    return true;
}

设置标记:

public void mark(int readAheadLimit) throws IOException {
    if (readAheadLimit < 0) {//最大预读小于0
        throw new IllegalArgumentException("Read-ahead limit < 0");
    }
    synchronized (lock) {
        ensureOpen();
        this.readAheadLimit = readAheadLimit;//线程同步限制
        markedChar = nextChar;//标记当前位置
        markedSkipLF = skipLF;//标记换行符跳过状态
    }
}

状态返回至标记位置:

public void reset() throws IOException {
    synchronized (lock) {
        ensureOpen();
        if (markedChar < 0)
            throw new IOException((markedChar == INVALIDATED)
                                  ? "Mark invalid"
                                  : "Stream not marked");
        nextChar = markedChar;
        skipLF = markedSkipLF;
    }
}

关闭流,清空缓存:

public void close() throws IOException {
    synchronized (lock) {
        if (in == null)
            return;
        try {
            in.close();
        } finally {
            in = null;
            cb = null;
        }
    }
}

返回字符串流:

public Stream<String> lines() {
    Iterator<String> iter = new Iterator<String>() {//字符串迭代器
        String nextLine = null;

        @Override
        public boolean hasNext() { //检测是否还可读
            if (nextLine != null) {
                return true;
            } else {
                try {
                    nextLine = readLine();
                    return (nextLine != null);
                } catch (IOException e) {
                    throw new UncheckedIOException(e);//未检查IO异常
                }
            }
        }

        @Override
        public String next() {//读取下一行
            if (nextLine != null || hasNext()) {
                String line = nextLine;
                nextLine = null;
                return line;
            } else {
                throw new NoSuchElementException();
            }
        }
    };
    return StreamSupport.stream(Spliterators.spliteratorUnknownSize(
            iter, Spliterator.ORDERED | Spliterator.NONNULL), false);//返回一个有定制操作迭代器的String流
}




Buffered型的IO类设计思路大同小异,希望读者可以举一反三


深入理解Java中的BufferedReader类:一切从读取开始。 🏆本文收录于「滚雪球学Java」专栏,专业攻坚指数级提升,助你一臂之力,带你早日登顶🚀,欢迎大家关注&&收藏!持续更新中,up!up!up!! 阅读详情

相关推荐

Java中BufferedReader与BufferedWriter类的使用示例

BufferedReader与BufferedWriter分别继承于Reader和Writer类,分别为字符的读取和写入添加缓冲功能,这里我们就来看一下Java中BufferedReader与BufferedWriter类的使用示例:

Java流

java 的I/O建立于流(stream)之上。输入流读取数据;输出流写入数据。不同的流类读写某一种数据源。但是。所有的输出流都有相同的基本方法来写入数据,所有的输入流都有相同的基本方法来读取数据。      过滤器(filter)流可以链接到输入流或输出流上。过滤器可以在读写数据时修改数据(例如,通过加密或者压缩)  或者提供额外的方法,将读写的数据转换为其他的格式。例如,java.io.DA

835

pynq-z2 HLS开发

定制Overlay一.用HLS生成一个定制IP功啊啊是合理的创建标题,有助于目录的生成如何改变是式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 一.用HLS生成一个定制IP ...

qq_38769280的博客 4156

java BufferedReader类、BufferedWriter类

读取一个字符char并以整数int形式返回。整数int对应的字符char在ascall码表上的值。创建一个使用默认大小的输入缓冲区的缓冲字符(char,一个字符为两个字节)输入流。创建一个使用指定大小的输入缓冲区的缓冲字符输入流。当在控制台输入abced时,输出的结果为c。关闭当前的缓冲字符输入流并释放相关的资源。跳过指定的字符数,返回实际跳过的字符数。从标准输入中读取一个字符串。..................

weixin_49346755的博客 787

百度网盘开放平台OAuth 2.0授权全流程解析

本文详细解析了百度网盘开放平台OAuth 2.0授权全流程,包括创建应用、获取凭证、授权码模式详解以及access_token的使用与刷新。通过实际案例和代码示例,帮助开发者快速掌握接口调用技巧,避免常见错误,确保安全高效地接入百度网盘API。

wind6的博客 1268

ARM学习 | 紧耦合存储器 (TCM)

TCM 是一种专用的片上存储器,直接与处理器核心耦合。确定性访问:由于不涉及缓存替换或一致性管理,访问延迟固定。高带宽:TCM 通常通过专用总线连接处理器核心,可以提供更高的数据吞吐率。用户管理:TCM 的分配和管理完全由开发者控制,不依赖硬件缓存策略。ARM 处理器中的 TCM 通常分为ITCM(指令紧耦合存储器)和DTCM(数据紧耦合存储器),分别用于存储指令和数据。TCM 是 ARM 处理器中不可忽视的重要特性,在实时系统和高性能嵌入式应用中具有重要地位。

qq_43167806的博客 3330

JDK1.8源码学习--io包(BufferedReader)

前言 月是一轮明镜,晶莹剔透,代表着一张白纸(啥也不懂) 央是一片海洋,海乃百川,代表着一块海绵(吸纳万物) 泽是一柄利剑,千锤百炼,代表着千百锤炼(输入输出) 月央泽,学习的一种过程,从白纸->吸收各种知识->不断输入输出变成自己的内容 希望大家一起坚持这个过程,也同样希望大家最终都能从零到零,把知识从薄变厚,再由厚变薄! 一.BufferedInputStream的作用: 直接看源码注释(我的翻译可能不太准,如果道友们有更棒的理解,可以留言或者私信)...

w5_Silence的博客 547

opencode : 无法将“opencode“项识别为 cmdlet、函数、脚本文件或可运行程序的名称 解决方案

opencode命令识别问题与openclawcodexgemini确保的路径在 PATH 中。这个知识对所有 npm 全局工具通用。

一键难忘的博客 4524

Java IO包中Reader及Writer的简介说明

Java IO包中Reader及Writer的简介说明

qq_25073223的博客 401

高云FPGA系列教程(8):ARM串口数据接收(中断和轮询方式)

GW1NSR-4C ARM部分共有2个串口外设,都挂载在APB1总线上,最高支持波特率921.6Kbit/s,无奇偶校验位,8位数据位,1位停止位,支持高速测试模式 HSTM(High Speed Test Mode),即每个时钟周期输出1位数据,可以在短时间内传输大量数据。官方手册上没有描述发送和接收缓存FIFO的深度,所以不确定是否支持缓存。

whik1194的博客 1687

39、信号流图:解决线性代数方程组的图论方法

本文介绍了信号流图理论在求解线性代数方程组中的应用,重点阐述了Coates方法和Mason方法的原理、步骤及对比分析。通过图论视角,将矩阵运算转化为对有向图结构的分析,利用1-因子、1-阶连接、前向路径和反馈回路等概念,推导出方程组解的拓扑公式。文章结合具体实例演示两种方法的计算过程,并总结其在电路分析、控制系统和通信系统等领域的拓展应用,展示了信号流图理论的直观性与有效性。

pear55的博客 89

如何用Java读取文件– BufferedReader

在本文中,我们将向您展示如何使用java.io.BufferedReader从文件中读取内容 注意 以这种不同的方式读取文件 1. Files.newBufferedReader(Java 8) 在Java 8中,有一个新方法Files.newBufferedReader(Paths.get("file"))返回一个BufferedReader filename.txt A B...

一名可爱的技术搬运工 3309

机器人控制基础:伺服驱动电机 PID 参数自适应控制的实现方法及研究

伺服电机PID参数自适应控制技术研究 摘要:针对伺服驱动电机在动态负载工况下传统PID控制性能下降的问题,本文研究了多种自适应控制方法。通过分析6种主流技术(包括模型参考自适应、模糊逻辑、神经网络等)的原理、实现步骤及适用场景,揭示了负载感知精度、参数调节实时性和系统稳定性三大技术难点,并提出了相应解决方案。以模糊自适应PID为例的实验验证表明,该技术能有效提升伺服系统在变负载条件下的控制性能。研究为工业应用中伺服电机的精确控制提供了重要参考。

start_up_go的博客 828

【JAVASE】IO系列 BufferedReader(超详细解析)

????:博客首页: 进击的波吉 ????:今日分享的文章: 【JAVASE】IO系列 BufferedReader ????:希望自己对IO系列的解析可以帮助到大家???? ????:Boji 还在努力学JavaSE ,如有疑问、疏漏之处,请多多指点???? ☀️:自学成长的路上,感谢大家相伴!No hurry , No Pause !???? 文章目录前提:1.基本介绍:2. BufferedReader 函数列表3.案例演示:3.1 从控制台读取多字符输入3.2 从控制台读取字符串4. Buffer

qq_51451731的博客 1万+

【经验&技巧】如何在ADS中导入示波器的时域波形?

从示波器中导出的时域波形数据,需要按照固定的格式进行修改,并通过Display dataset对话框导入ADS。

一只豌豆象的博客 1575

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

java IO流之BufferedReader和BufferedWriter

笑霸能看懂的学习笔记

学习笔记,相关教程 分享 6695

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

Java BufferedReader

Java BufferedReader class is a part of java.io package. Java BufferedReader类是java.io包的一部分。 BufferedReader is a sub class of java.io.Reader class. BufferedReader是java.io.Reader类的子类。 Java BufferedRe...

从零开始的教程世界 2243

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

Java 日看一类(29)之IO包中的InputStreamReader类

该类继承自Reader类引入了如下包:import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import sun.nio.cs.StreamDecoder; 类头注释如下/** * An InputStreamReader is a bridge from byte streams to characte...

github_37666068的博客 1406

Java 日看一类 (33)之IO包中的LineNumberReader类

该类无引入包继承自BufferedReader类类头注释如下:/** * A buffered character-input stream that keeps track of line numbers. This * class defines methods {@link #setLineNumber(int)} and {@link * #getLineNumber()} for...

github_37666068的博客 376

Java中Scanner类和BufferedReader类的区别

让你对选择使用Scanner类还是BufferedReader类有比较深刻的认识。

蔡欣致的个人博客 2051

Java 日看一类(51)之IO包中的Reader类

该类完成了Readable、Closeable接口无引入其他包该类的类头注释如下:/** * Abstract class for reading character streams. The only methods that a * subclass must implement are read(char[], int, int) and close(). Most * subcl...

github_37666068的博客 538

【Java】 Java 中的 BufferedReader 详解

BufferedReader 是 Java 中的一个类,位于 java.io 包中,它用于从字符输入流中读取文本,提供了缓冲功能以提高读取效率。与直接从输入流读取字符相比,BufferedReader 提供了一种更高效的方法,因为它在读取数据时使用了缓冲区,从而减少了对底层 I/O 操作系统的频繁访问。BufferedReader 通常结合 FileReader 使用,用于读取文本文件中的字符。它的缓冲机制使得读取操作比 FileReader 更加高效,特别是在处理大文件时。

哈哈哈哈哈哈哈 2790

Java开发中一些常用的类,包,接口

在Java开发中,了解和熟悉一些常用的类、包和接口是非常重要的。这些类、包和接口涵盖了Java标准库和常用的第三方库,能够极大地提高开发效率和代码质量。下面是对一些常用的类、包和接口的详细介绍。

m0_70154470的博客 1885

Java IO——PrintWriter与BufferedReader

  java.io.PrintWriter:具有自动刷新的缓冲字符输出流,特点是可以按行写出字符串,并且可以自动刷新. PrintWriter没有对应的输入流,作为处理流使用时,PrintWriter既可以封装OutputStream类型字节流,还能够封装Writer类型的字符输出流并增强其功能,方法也从不抛出IOExcepiton  * 注: java.io.BufferdWriter是缓...

十七弦的博客 1703

java中的new BufferedReader(new InputStreamReader(System.in))

流 JAVA /IO 基本小结 通过一行常见的代码讨论:new BufferedReader(new InputStreamReader(System.in)) java的IO是基于流(stream)概念的,什么是流呢,作为初学者, 我是这样理解的,在各个应用之间传送的是BITS,这些BIT可已被认为是流体,可以就认为是水流,那么用来在各个水源之间转移水的工具应该选择什么呢?一般情况下,水管...

FE攻城狮 4万+

Java BufferedReader类简介说明

Java BufferedReader类简介说明

qq_25073223的博客 2311
上一篇: Java 日看一类(3)之IO包中的BufferedOutputStream类
下一篇: Java 日看一类(5)之IO包中的BufferedWriter类
wyf95278
博客等级 码龄10年 38粉丝 71原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值