It 18 Palm Palm 14th Day Course Summary

Source: Internet
Author: User

Finish the 14th day of it 18 Palm Java Foundation Course today:


Learning content:


Bufferedoutputstream: Buffer byte output stream

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

1.Object--OutputStream-Filteroutputstreasm-BUFFEREDOUTPUTSTREAMSS

2. Use decorative mode

3.close ()




Bufferedinputstream: buffer byte input stream

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

1.Object--InputStream-Filterinputstreasm-BUFFEREDINPUTSTREAMSS

2.close ()

Frees the system resources associated with it. Multiple shutdowns have no effect.

Close from outside to inside.

3.

4.


FileReader

FileWriter


BufferedReader

LineNumberReader

BufferedWriter


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


FileInputStream

FileOutputStream


Bufferedinputstream

Bufferedoutputstream



byte array output stream: Bytearrayoutputstream

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

1.Object--OutputStream-Bytearrayoutputstream

2. Open up space in memory and store data. Not a buffer stream

3.

4.


byte array input stream: Bytearrayinputstream

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

1.Object--InputStream-Bytearrayinputstream

2.

3.

4.



byte array output stream: Bytearrayoutputstream

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

1.Object--OutputStream-Bytearrayoutputstream

2.

3.

4.


Use OutputStreamWriter to FileOutputStream Wrapper, write character data to file by wrapping stream.



InputStreamReader:

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

is a bridge from a byte stream to a stream of characters, reading a byte array and decoding (using the specified character set) into characters. The character set can be specified with a name or

The CharSet object is specified, or the platform is available by default.

Each read () method call causes the underlying byte stream to read one or more bytes of data. If you need to handle it efficiently, you can use it

BufferedReader for packaging.

1.Object----Reader--InputStreamReader

2. Not a buffer stream

3. When using, try to use BufferedReader to pack and improve the efficiency.

4.


OutputStreamWriter:

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


1.Object-----OutputStreamWriter

2. Not a buffer stream

3. When using, try to use BufferedReader to pack and improve the efficiency.

4.

Ss

File:

Directory:

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

1. Refers to the folder where the file resides.

2. Relative path. | ..

3.

Path: The address of the precise location file.






Problems encountered:

1. Character encoding problem,

2. Relative path and absolute path, file path and folder path

3. Byte array input/output stream differs from buffer




Questions that need help

1. Byte array input/output stream differs from buffer


This article from "Rookie Achievement Data Road" blog, reproduced please contact the author!

It 18 Palm Palm 14th Day Course Summary

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.