Java IO stream part knowledge point

Source: Internet
Author: User

IO stream part IO stream is commonly used: character stream, byte stream, buffered stream, serialized stream, Randomaccessfile class, etc. 1, byte stream
    • Fileinputstream/fileoutputstream

    • Bufferedinputstream/bufferedoutputstream

2. Character Stream
    • Inputstreamreader/outputstreamwriter

    • Bufferedreader/bufferedwriter

    • Filereader/filewriter

    • Where Bufferedreader/bufferedwriter is also known as the character buffer stream , you can read one line at a time, write one line at a time; filereader/filewriter Inputstreamreader/outputstreamwriter inherited from,Inputstreamreader/outputstreamwriter, BufferedReader/ BufferedWriter is inherited from reader/writer;

3. Buffer Stream (Buffer stream in bytes)
    • Bufferedinputstream/bufferedoutputstream

    • Buffered streams are byte-stream

4, Randomaccessfile class
    • The Randomaccessfile class is written in the literal sense of a random write, which means that there are two ways that the class can write and write;

5, the object's deserialization stream, the serialized stream (ObjectOutputStream, ObjectInputStream)
    • Serializing the stream, deserializing the stream involves the serialization interface (serializable), and wants to implement the serialization and deserialization of the object, which must inherit the serialized interface (that is, implements serializable)

    • Note : All streams need to perform a close stream operation (that is, the close () method) after completion of the operation, while the input stream is refreshed (that is, the flush () method) operation;

Java IO stream part knowledge point

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.