Save This Page
Home » openjdk-7 » java » util » zip » [javadoc | source]
java.util.zip
public class: CheckedInputStream [javadoc | source]
java.lang.Object
   java.io.InputStream
      java.io.FilterInputStream
         java.util.zip.CheckedInputStream

All Implemented Interfaces:
    Closeable

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.
Fields inherited from java.io.FilterInputStream:
in
Constructor:
 public CheckedInputStream(InputStream in,
    Checksum cksum) 
    Creates an input stream using the specified Checksum.
    Parameters:
    in - the input stream
    cksum - the Checksum
Method from java.util.zip.CheckedInputStream Summary:
getChecksum,   read,   read,   skip
Methods from java.io.FilterInputStream:
available,   close,   mark,   markSupported,   read,   read,   read,   reset,   skip
Methods from java.io.InputStream:
available,   close,   mark,   markSupported,   read,   read,   read,   reset,   skip
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.util.zip.CheckedInputStream Detail:
 public Checksum getChecksum() 
    Returns the Checksum for this input stream.
 public int read() throws IOException 
    Reads a byte. Will block if no input is available.
 public int read(byte[] buf,
    int off,
    int len) throws IOException 
    Reads into an array of bytes. If len is not zero, the method blocks until some input is available; otherwise, no bytes are read and 0 is returned.
 public long skip(long n) throws IOException 
    Skips specified number of bytes of input.