Byte stream InputStream/OutputStream

Byte stream InputStream/OutputStream This article will give a brief summary of the byte stream InputStream/OutputStream in the JAVA I/O stream: In general, each byte stream class has a corresponding purpose, as follows: ByteArrayInputStream/ByteArrayOutputStream //Byte array related FileInputStream/FileOutputStream //File operation related PipedOutputStream/PipedInputStream //Inter-thread communication (pipeline) BufferedInputStream/BufferedOutputStream //Decorate other byte streams and add buffering function FilterInputStream/FilterOutputStream //Decorate […]

Java-Object processing streams ObjectOutputStream and ObjectInputStream (serialization and deserialization)

Java-Object processing streams ObjectOutputStream and ObjectInputStream (serialization and deserialization) Refers to serialization and deserialization operations on basic data types or objects; Serialization When saving data, save the value and data type of the data; Serialized into byte stream; Deserialization When restoring data, restore the value and data type of the data; Deserialization of byte streams […]

Classification of IO streams in Java, byte stream and character stream, node stream and processing stream overview, FileInputStream, FileOutputStream, FireReader, FireWriter, BufferReader code

Classification of IO streams According to the different operation data units, it is divided into: byte stream and character stream According to the flow direction of the data flow, it is divided into: input flow and output flow According to the role of the flow, it is divided into: node flow and processing flow (packaging […]

[Byte stream (InputStream) (OutputStream) in IO stream]

Character set Americans invented the computer To save their characters into the computer (English letters, numbers, punctuation, special characters) The characters are numbered to form an ASCII code table (American Standard Code for Information Interchange), which contains a total of 128 characters. This code table stores 1 character in 1 byte, and the first bit […]

[JavaSE Column 75] Byte output stream OutputStream, used to write byte data to the output target stream

Author Homepage: Designer Xiaozheng About the author: 3 years of JAVA full-stack development experience, focusing on JAVA technology, system customization, remote guidance, dedicated to enterprise digital transformation, certified lecturer of CSDN College and Blue Bridge Cloud Course. Main direction: Vue, SpringBoot, WeChat applet This article explains the syntax of the byte stream OutputStream class in […]

Java node stream: FileInputStream\FileOutputStream

Article directory Byte input stream: InputStream Byte output stream: OutputStream FileInputStream FileOutputStream practise Byte input stream: InputStream The java.io.InputStream abstract class is the superclass of all classes that represent byte input streams, and can read byte information into memory. It defines basic generic functional methods for byte input streams. public int read(): Reads a byte […]

OutputStream source code

Introduction OutputStream is an abstract class in the java.io package, representing the base class for outputting byte streams. OutputStream provides a set of methods for processing byte output, including methods such as write(), flush(), and close(). The OutputStream class inherits from the Object class, and its subclasses can be used to write data between different […]

FileInputStream and FileOutputStream

Overview of FileInputStream and FileOutputStream FileInputStream and FileOutputStream are Java I/O A stream class for handling file input and output in . They are byte streams for reading and writing byte data. FileInputStream: used to read byte data from a file. It inherits from the InputStream class. By creating a FileInputStream object, you can open […]

Java zip file compression and decompression: ZipInputStream, ZipOutputStream

Table of Contents File Compression ZipOutputStream File decompression: ZipInputStream File compression ZipOutputStream When using ZipOutputStream to compress a folder, it should be used with ZipEntry. ZipEntry is used to create compressed files. For example, add a file code to the compressed file: //zipOut: the path of the compressed file ZipOutputStream zipOutputStream = new ZipOutputStream(new FileOutputStream(zipOut)); […]