Java io (1)

Source: Internet
Author: User

1. decorator)

Dynamically attaches the responsibility to the object. To expand the functionality, the decorator provides an alternative solution that is more flexible than inheritance.

(The decorator Can add his/her own behavior before and after the behavior of the entrusted decorator to achieve a specific purpose)

 

 

Decorator in Java. Io package

Abstract components include inputstream, outputstream, reader, and writer.

 

Ii. Stream

In Java, file operations are performed in a stream. A stream is a set of ordered data sequences in Java memory. Java reads data from the source (file, memory, keyboard, network) to the memory, forming
Stream, and then write these streams to another destination (file, memory, console, network, this is because the data sequence operates different parts of the source at different times.

 

Iii. class hierarchy

  • Java. Lang. Object

    • Java. Io.File
      (Implements java. Lang. Comparable <t>, java. Io. serializable)
    • Java. Io.Filedescriptor
    • Java. Io.Inputstream
      (Implements java. Io. closeable)

      • Java. Io.Bytearrayinputstream
      • Java. Io.Fileinputstream
      • Java. Io.Filterinputstream
        • Java. Io.Bufferedinputstream
        • Java. Io.Datainputstream
          (Implements java. Io. datainput)
        • Java. Io.Linenumberinputstream
        • Java. Io.Pushbackinputstream
      • Java. Io.Objectinputstream
        (Implements java. Io. objectinput, java. Io. objectstreamconstants)
      • Java. Io.Pipedinputstream
      • Java. Io.Sequenceinputstream
      • Java. Io.Stringbufferinputstream
    • Java. Io.Objectinputstream. getfield
    • Java. Io.Objectoutputstream. putfield
    • Java. Io.Objectstreamclass
      (Implements java. Io. serializable)
    • Java. Io.Objectstreamfield
      (Implements java. Lang. Comparable <t>)
    • JAVA. io. outputstream
      (implements Java. io. closeable, Java. io. flushable)

      • JAVA. Io. bytearrayoutputstream
      • JAVA. Io. fileoutputstream
      • JAVA. Io. filteroutputstream
        • JAVA. Io. bufferedoutputstream
        • JAVA. Io. dataoutputstream
          (implements java. Io. dataoutput)
        • JAVA. Io. printstream
          (implements java. Lang. appendable, java. Io. closeable)
      • JAVA. Io. objectoutputstream
        (implements java. Io. objectoutput, java. Io. objectstreamconstants)
      • JAVA. Io. pipedoutputstream
    • Java. Security.Permission
      (Implements java. Security. Guard, java. Io. serializable)

      • Java. Security.Basicpermission
        (Implements java. Io. serializable)

        • Java. Io.Serializablepermission
      • Java. Io.Filepermission
        (Implements java. Io. serializable)
    • Java. Io.Randomaccessfile
      (Implements java. Io. closeable, java. Io. datainput, java. Io. dataoutput)
    • Java. Io.Reader
      (Implements java. Io. closeable, java. Lang. readable)

      • Java. Io.Bufferedreader

        • Java. Io.Linenumberreader
      • Java. Io.Chararrayreader
      • Java. Io.Filterreader
        • Java. Io.Pushbackreader
      • Java. Io.Inputstreamreader
        • Java. Io.Filereader
      • Java. Io.Pipedreader
      • Java. Io.Stringreader
    • Java. Io.Streamtokenizer
    • Java. Lang. Throwable
      (Implements java. Io. serializable)

      • Java. Lang. Exception

        • JAVA. Io. ioexception

          • JAVA. Io. charconversionexception
          • JAVA. Io. eofexception
          • JAVA. Io. filenotfoundexception
          • JAVA. Io. interruptedioexception
          • JAVA. Io. objectstreamexception
            • JAVA. Io. invalidclassexception
            • JAVA. Io. invalidobjectexception
            • JAVA. Io. notactiveexception
            • JAVA. Io. notserializableexception
            • JAVA. Io. optionaldataexception
            • JAVA. Io. streamcomputedexception
            • JAVA. Io. writeabortedexception
          • JAVA. Io. syncfailedexception
          • JAVA. Io. unsupportedencodingexception
          • JAVA. Io. utfdataformatexception
    • Java. Io.Writer
      (Implements java. Lang. appendable, java. Io. closeable, java. Io. flushable)

      • Java. Io.Bufferedwriter
      • Java. Io.Chararraywriter
      • Java. Io.Filterwriter
      • Java. Io.Outputstreamwriter
        • Java. Io.Filewriter
      • Java. Io.Pipedwriter
      • Java. Io.Printwriter
      • Java. Io.Stringwriter
Interface hierarchy
    • JAVA. Io. closeable
    • JAVA. Io. datainput
      • JAVA. Io. objectinput
    • JAVA. Io. dataoutput
      • JAVA. Io. objectoutput
    • JAVA. Io. filefilter
    • JAVA. Io. filenamefilter
    • JAVA. Io. flushable
    • JAVA. Io. objectinputvalidation
    • JAVA. Io. objectstreamconstants
    • JAVA. Io. serializable
      • JAVA. Io. externalizable

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.