--java Basic IO stream of the Dark Horse programmer--Part III

Source: Internet
Author: User

-----------android training ,Java training , Java Learning Technology blog, look forward to communicating with you! ------------ 

First: Dark Horse programmer _ Bi Xiangdong _java Basic Video tutorial 20th day -01-io Stream (file overview) One, the file class understanding:
    1. Used to encapsulate a file or folder as an object.
    2. Easy to manipulate files and folders.
    3. The file object can be passed as a parameter to the construction method of the Stream object.
    4. Declaration of the File class: The public class file extends Object implements Serializable, an abstract representation of the comparable<file> file and directory path names.
    5. Construction method: Public File(String pathname) creates a new instance by converting the given pathname string to an abstract pathname File . if the given string is an empty string, the result is an empty abstract path name .
    6. Constructor: Public File(string parent, string child) creates a new instance based on the parent pathname string and the children pathname string File .
    7. Construction method: Public file(Uri Uri) creates a new file instance by converting the given file: URI to an abstract pathname.
    8. static field: public static final String separator the system-related default name delimiter, which is represented as a string for convenience. This string contains only a single character.
    9. Method: Public boolean isfile() tests whether the file represented by this abstract path name is a standard file.
    10. Method: Public boolean isdirectory() tests whether the file represented by this abstract path name is a directory.
    11. Method: Public boolean Ishidden() tests whether the file specified by this abstract path name is a hidden file.
    12. Method: public string GetPath() converts this abstract pathname to a path name string. The resulting string uses 默认名称分隔符 the name in the delimited name sequence.
    13. Method: Public String getName() returns the name of the file or directory represented by this abstract path name.

--java Basic IO stream of the Dark Horse programmer--Part III

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.