Thinking in Java note 18 Io

Source: Internet
Author: User
* ** The file class actually describes filepath.
File Path = new file ("./bin/outputverifier. py"); // get the file

File Path = new file ("./bin"); // get the folder

String [] list = path. list (); // get the file and folder list in path. if the list (filenamefilter filter) file is a directory, you can use the list () method to obtain an array of names of all the files and directories in this directory, the List () method, one is no parameter, and the other is a parameter that implements the filenamefilter interface. For example, to obtain all the java files in a specified directory, you must use the second list () with parameters () method *** reader writer inputstream outputstream provides Unicode-compatible and character-oriented Io reader for byte-oriented Io reader. inputstreamreader can convert inputstream to reader outputstreamreader and convert outputstream to writer ** * buffer the input file buff. Eredreader in = new bufferedreader (New filereader (filename);, in. readline (); *** input stringreader in = new stringreader (bufferedinputfile. read (". /src/IO/bufferedinputfile. java "); int C; while (C = in. read ())! =-1) system. Out. Print (char) C); *** formatted memory input datainputstream is a byte-oriented class, which uses inputstream as the parameter
Related Article

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.