Explore Java I/O classes and Interfaces

Source: Internet
Author: User

The I/O classes defined by Java.io are shown in the following table:

Bufferedinputstream Bufferedoutputstream BufferedReader BufferedWriter Bytearrayinputstream Bytearrayoutputstream Chararraywriter Console DataInputStream
DataOutputStream File FileDescriptor FileInputStream FileOutputStream Filepermission FileReader FileWriter FilterInputStream
Filteroutputstream FilterReader Filterwriter InputStream InputStreamReader LineNumberReader ObjectInputStream Writer OutputStream
ObjectOutputStream ObjectStreamClass Objectstreamfile Pipedreader PipedInputStream PipedOutputStream PipedWriter Reader PrintStream
PrintWriter Streamtokenizer StringReader StringWriter Randomaccessfile

Stream-based I/O in Java is based on 4 abstract classes: Inputstream,outputstream,reader and Writer. InputStream and OutputStream are used for byte stream, Reader and writer for character streams. In general, you should use a character stream class when dealing with characters or strings, and you should use a byte stream class when dealing with characters and other binary objects.

Explore Java I/O classes and Interfaces

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.