Javazip 简明教程
java.util.zip - CheckedInputStream Class
Introduction
java.util.zip.CheckedInputStream 类是一个输入流,它还维护读取数据的校验和。然后,可以利用校验和来验证输入数据的完整性。
The java.util.zip.CheckedInputStream class is an input stream that also maintains a checksum of the data being read. The checksum can then be used to verify the integrity of the input data.
Class Declaration
下面是 java.util.zip.CheckedInputStream 类的声明−
Following is the declaration for java.util.zip.CheckedInputStream class −
public class CheckedInputStream
extends FilterInputStream
Constructors
Sr.No. |
Constructor & Description |
1 |
CheckedInputStream(InputStream in, Checksum cksum) Creates an input stream using the specified Checksum. |
Class Methods
Sr.No. |
Method & Description |
1 |
Checksum getChecksum()Returns the Checksum for this input stream. |
2 |
int read()Reads a byte. |
3 |
int read(byte[] buf, int off, int len)Reads into an array of bytes. |
4 |
long skip(long n)Skips specified number of bytes of input. |