IT. Expert System.

Java Standard Edition (SE)

CheckedInputStream


compact1, compact2, compact3
java.util.zip

Class CheckedInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable


    public class CheckedInputStream
    extends FilterInputStream
    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.
    See Also:
    Checksum
    • Constructor Detail

      • CheckedInputStream

        public CheckedInputStream(InputStream in,
                                  Checksum cksum)
        Creates an input stream using the specified Checksum.
        Parameters:
        in - the input stream
        cksum - the Checksum
    • Method Detail

      • read

        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.
        Overrides:
        read in class FilterInputStream
        Parameters:
        buf - the buffer into which the data is read
        off - the start offset in the destination array b
        len - the maximum number of bytes read
        Returns:
        the actual number of bytes read, or -1 if the end of the stream is reached.
        Throws:
        NullPointerException - If buf is null.
        IndexOutOfBoundsException - If off is negative, len is negative, or len is greater than buf.length - off
        IOException - if an I/O error has occurred
        See Also:
        FilterInputStream.in
      • skip

        public long skip(long n)
                  throws IOException
        Skips specified number of bytes of input.
        Overrides:
        skip in class FilterInputStream
        Parameters:
        n - the number of bytes to skip
        Returns:
        the actual number of bytes skipped
        Throws:
        IOException - if an I/O error has occurred
      • getChecksum

        public Checksum getChecksum()
        Returns the Checksum for this input stream.
        Returns:
        the Checksum value


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 130 / 159282237. Delta: 0.07786 с