InputStream
时间: 2023-10-25 10:33:36 浏览: 35
InputStream is an abstract class in Java that provides a way to read data from a source in a sequential manner. It is the superclass of all classes representing an input stream of bytes.
The InputStream class provides a set of methods for reading different types of data such as bytes, characters, and lines. It also provides methods for skipping data, marking the current position, and resetting to the marked position.
Some of the commonly used subclasses of InputStream are FileInputStream, ByteArrayInputStream, DataInputStream, ObjectInputStream, etc.
InputStream is used extensively in Java for reading data from files, network sockets, and other sources. It is a fundamental class in Java IO and is used in many other classes to implement input operations.