Java Foundation 15th Day Summary

Source: Internet
Author: User

Randomaccessfile

-----------------------

Random access to files

1) object-->randomaccessfile

2) Implement Datainput DataOutput interface

3) Seek (int byte)

4)

Using Randomaccessfile to implement file compositing


The JavaBean implementation of its own definition requires the implementation of the Serializable interface, which is used to identify the interface, there is no task method, is to the Java virtual machine to see.


Inter-network transmission or localized storage requires serialization

Converts a Java object into a binary array,

Java.io.Serializable//Serializable interface, identity, JVM look.

Serialization version UID//a tag for the class, the main purpose is to carry out crossdress line.



Deep replication refers to copying an entire object graph. Benefits: Generate a large number of objects in a flash, consume memory

transient://Temporary Keywords


ObjectInputStream//ObjectOutputStream Object flow


Bytearrayinputstream/bytearrayoutputstream Memory Output input stream


Read (char) write (byte[])


DataInputStream//Data input stream

DataOutputStream//Data output stream

The occurrence of a character stream in order to manipulate characters

More important is the addition of the encoding conversion

Through the subclass conversion flow to complete

InputStreamReader

OutputStreamWriter

A character set can be added when two objects are constructed





Java Foundation 15th Day Summary

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.