//***
* Java IO detailed description see http://www.senma.org/blogs/356.html
* You can also refer to: http://www.cnblogs.com/rollenholt/archive/2011/09/11/2173787.html
*/
Import java. io. BufferedReader;Import java. io. File;Impor
The following table summarizes the main differences between Java NiO and Io, and I describe the differences in each part of the table in more detail.
Copy Code code as follows:
IO NIO
Stream-oriented buffer
Blocking IO non-blocking IO
No selector
One end is hashed into Java IO, and the other end is hashed into javaio.
Java IO Overview
In this section, I will try to give an overview of all classes under the Java IO (java.
The byte array input stream creates a byte array buffer in memory, and the data read from the input stream is saved in the byte array buffer. There are several ways to create a byte array input stream Object.The receive byte array is created as a parameter:New Bytearrayinputstream (byte [] a);Another way to create this is to receive a byte array, and two shaping variables off, Len,off represents the first read byte, and Len represents the length of the read Byte.New Bytearrayinputstream (byteint
1. Io Stream (Overview of IO Stream and its classification)
1. Concept
IO streams are used to process data transfer between devices
The Java operation of the data is streamed through the way
The classes that Java uses to manipulate the flow ar
Java IO learning notes (1), javaio learning notesBasic knowledge 1. stream classification all streams are in java. io packages are divided by stream direction: input stream and output stream are divided by Data Processing Unit: byte stream and worker stream according to different functions: node stream and abstract cla
Original link: The difference between Java NiO and IOThe following table summarizes the main differences between Java NiO and Io, and I'll describe in more detail the differences in each section of the table.Copy CodeThe code is as follows:IO NIOStream-oriented bufferingBlocking IO non-blocking IONo selectorStream-orie
It is the well-known "Murphy's Law" to be afraid of what to do. Java Foundation covers all aspects, dare to say that the Java foundation of the people are not just graduating students, is working n years of programmers. Programmers who work n years don't even dare everyone to say that Java is a solid foundation, or even proficient, often just "without him"-skille
Java IO programming refers to manipulating files through a Java program. such as file read-write, delete, backup and so on. The basic concepts of file flow need to be mastered. Master the IO programming method, grasp the byte stream and the character stream file in the program is to operate in the form of a stream what
Java IO (1) Basic knowledge-byte and character, javaio
What do you fear? This is a well-known "Murphy's Law ". Java basics cover all aspects. Dare to say that people with solid Java foundations are not new students, but programmers who have been working for N years. Programmers who have been working for N years have ne
I. Summary of IO flow1, Java I/O mainly includes the following 3 levels:Flow section-the most important part. such as: OutputStream, InputStream, Writer, reader, etc.Non-streaming parts-such as: File class, Randomaccessfile class, and FileDescriptor classOther--security-related classes in the file reading section, such as the Serializablepermission class, and the class of the file system associated with the
to restore the original stream of bytes might fail!Because in the second of the above, some bytes of data through the GBK transcoding, may be made, and? The byte data in GBK is probably different from the original byte data! So S2 was garbled.This shows that in the process of encoding conversion, it is very likely to not turn back!
Topic Two: IO process of network exchange data650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/78/81/w
Fileinputstream
Import Java. io. file; import Java. io. fileinputstream; import Java. io. inputstream; public class testfileinputstream {public static void main (string [] ARGs) throws exception {// The exception is thrown and not
JAVA 47th-IO stream (1): file read/write
Input stream and output stream relative to memory
Read data from external devices to memory: Input
Write data in memory to external devices: Output
I/O streams often use base classes
Abstract base class of byte stream: InputStream, OutputStream
Abstract base class of characters: Reader and Writer
PS: The child classes generated by these four schools are suffixed with
If the following error is reported during Tomcat startup:
[Error, managerbase, main] ioexception while loading persisted sessions: Java. Io. eofexceptionJava. Io. eofexceptionAt java. Io. objectinputstream $ peekinputstream. readfully (objectinputstream.
Java. io. IOException: the software in your host suspends a established connection.
1. Error description
[19:13:48-ddmlib] the software in your host suspends a established connection. Java. io. IOException: the software in your host suspends a established connection. At sun. nio. ch. socketDispatcher. write0 (Native M
The most important function of a computer is to process data. A useful computer language needs to have good IO capabilities to allow the unhandled data to flow into the program and let the processed data flow out.
Java's IO functionality is complex compared to other languages. In other languages, many IO functions, such as reading files, are encapsulated and can
One months into the job, the position did not use the familiar C + + language, while working while learning Java. Recently because of the project requirements, often use Java read and write operations, some experience in this collation, the main idea: first introduce the basic IO function, and then how to choose the specific
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.