Alibabacloud.com offers a wide variety of articles about java io notserializableexception, easily find your java io notserializableexception information here online.
I. Input/output stream
1. Stream: Different types of input, output source data streams: input or output data
All of the interfaces and classes of the Java data stream are defined in the Java.io package, so you should add them at the beginning of the program
Import java.io.*
2. Classification of streams:
(1) from the flow direction, the IO stream can be divided into the input stream
ioexception
Normal
Create a new file
Public Boolean exists ()
Normal
Determine whether a file exists
Public Boolean Delete ()
Normal
Delete an object
Public Boolean isdirectory ()
Normal
Determines whether the specified path is a directory.
Public long length ()
Normal
Size of the returned File
Public String [] list ()
Normal
Lists all the contents of a specified directory, just the name
Public file [] lis
I. Java IO Overview 1.1 related conceptsJava IOJava IO is the Java input and output system. No matter what kind of application we write, it is unavoidable to deal with various kinds of input and output related media, in fact, the process of IO with the media is very complex,
. This means that the synchronous IO Model requires user code to perform IO operations on its own (moving the data from the kernel buffer to the user buffer or vice versa), while the asynchronous operation mechanism is performed by the kernel to perform IO operations (moving the data from the kernel buffer to the user buffer or vice versa). It can be argued that
After learning the APIs for Java NIO and Io, a problem immediately poured into my mind:When should I use IO and when do I use NIO? In this article, I'll try to clearly parse the differences between Java NiO and Io, their usage scenarios, and how they affect your code design.
The use of the file class in the JAVAI/O section of the Java---(note)In Java, I/O (input/output) is a tedious thing, because I do not see the obvious effect, but the input/output is a necessary part of all programs-using the input mechanism, allowing the program to read external data (including data from disk, CD and other storage devices), user input data, using the output mechanism, Allows the program to
When the socket receives data, it often throws Java. io. the eofexception is abnormal and there are no clear causes or prompts. Many people are asking this question on the Internet, but no practical solution is found. After research, the problem is solved. The exception stack information is as follows: Java. Io. eofexc
I reviewed the concepts related to Io, NIO and AIO in the morning and recorded some of these points.
from the programming language level
BIO | NIO | AIO in the Java perspective, understanding, Linux C also has the concept of AIO (library), these concepts do not know what reason is fired up, here only from the Java perspective.
BIO, synchronous b
+ ", age=" + Age + "]";}}transient keyword transientWhen an object of a class needs to be serialized, some attributes do not need to be serialized, and attributes that do not need to be serialized can be decorated with the keyword transient. This property is not serialized when serialized, as long as it is modified by transient or static . Static adornments are not serialized at the same time, because serialization is the persistent storage of object data, while static data belonging to the cla
the commonly used IO operations in Java can be divided into four parts: file class operation, Randomaccessfile class operation, Byte stream operation, character stream operation. as long as you master all the examples listed in this article, basically for the Java IO Stream operation can be said to be mastered. The fo
[Java iO] _ compressing stream notes
Objectives of this chapter:Measure the test taker's understanding about the main functions of the compressed stream.Understand three compression formats supported by Java IoUnderstanding the functions of zipoutputstream, zipfile, and zipinputstream
3. Details
Zipentry
ZipoutputstreamCompresses a file or folder into a zip file
fullFwriter.Close();//Close FileWriter object //Read fileFileReader Freader =NewFileReader (file);Char[] CS2 =New Char[ the]; Freader.Read(CS2);//This is not read by the while loop because it knows the length is not greater than 15 for(CharC:CS2) {//Traversal outputSystem. out.Print(c); } freader.Close();Operation Result:i love javaReference1. Java Stream (stream), file, and Io | Beginner's Tuto
operations are synchronous blocking calls, and asynchronous file read and write operations are not supported.
JDK1.7 launches NIO 2.0. The following three improvements are mainly provided.
Provides APIs that can obtain file attributes in bulk, which are platform agnostic and not coupled to the file system of the feature, and also provide the SPI for the standard file system for each service provider to extend the implementation;
Provides AIO functionality to support file-bas
Java advanced ------ IO stream
Concept and basic classification of stream: Concept of stream:
Stream is a very visual concept. When the program needs to read data, it will open a stream to the data source, which can be a file, memory, or network connection. Similarly, when the program needs to write data, it will open a stream to the destination. At this time, you can imagine that the data is "Flowing" h
handled by the user process.3 multiplexing IO: The user processregisters the IO request into the Select, the user process continues, select initiates the system call, the kernel does the data preparation, when the kernel prepares the data, returns the user process's readable instructions, the user process initiates the system call, the user process is blocked, The kernel copies the datagram to the user spa
According to UNIX network programming, IO models can be divided into: blocking io, non-blocking io, io multiplexing, signal-driven IO, and asynchronous Io, divided into two classes according to POSIX standards: synchronous
[Java iO] _ file class notes
Objectives of this chapter:
Measure the test taker's knowledge about the functions of the file class.You can use methods in the file class to operate files.
File class
In the entire Io package, the only class that indicates the file is the file class. You can use the File class to create and delete files. To use the File class, first
When learning Java NIO and IO APIs, a problem quickly emerges in the brain:When to use IO? When to use NiO?The author of this article will try to clarify some of the differences between Java NiO and Io, their use cases, and how they each affect our code design. The main diff
from the keyboard from the user String str = input . ReadLine (); Send the user input to the server out.println (str); Get string echo = Buf.readline () received to the service-side callback System.out.println (Echo);} }Considering that the full Java sample code is too large to affect reading, so here is not a full post, if need to download directly on GitHub, here is.As you can see, server needs to open a thread for each client
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.