After learning javaIO for the nth time, learn javaio

Source: Internet
Author: User

After learning javaIO for the nth time, learn javaio

Io by stream

Input stream and output stream

Io is divided by type (yes)

Byte stream and byte stream

-------------------------------------

First, let's talk about the time when the input stream is used for obfuscation and the time when the output stream is used. Program --> program, using InputStream. The output is also relative to the program. The program writes the information to (.txt) and uses OutputStream from the program -->. txt.

Public abstract classInputStreamExtends Object implements Closeable

InputStream this abstract class is a super class that represents all classes of the byte input stream. It is mainly used to read bytes and read () methods. The corresponding method is OutputStream, and there are write () and other methods.

  

Public abstract classReaderExtends Object implements Readable, Closeable

Here, the Reader and Writer are also a pair. They correspond to InputStream/OutputStream, and Reader and Writer process the livestream. Garbled characters start from here! Because the characters have different encoding, there is a UTF-8 storage, the GBK read out the garbled ..

What I want to do most after I/o learning is to read the files stored on the computer to the program for use and store the data locally .. With this knowledge, we can become a mo system!

 


Position where excel appears N times


To input two functions in total, follow these steps:
1. Enter the required number in column.
2. Enter the following functions in B1 and copy B1 to B2 to B14.
= IF (A1 = "", "", CONCATENATE (A1, "Liu Lei", COUNTIF (A $1: A1, A1 )))
3. Enter the number to be searched in E1 (that is, any number in column)
4. Enter the nth appearance in E2 (for example, the nth appearance position, enter 3 here)
5. Enter the following function in E3 and the result is what you want. If you are satisfied, Please score.
= MATCH (CONCATENATE (E1, "Liu Lei", E2), B $1: B $14,0)



Java Io stream read/write problems, saving lives

Khan, I tested it for a while before I found out where the problem was.
The problem is actually very simple.
Your BufferedOutputStream is not close
After it is disabled, there will be no problem,
What's more, lz is that the newly written file is smaller than the original file. It should be that the out file is not closed, and the last part of the file is not written in time.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.