IT. Expert System.

Android Reference

CheckedOutputStream


java.util.zip

Class CheckedOutputStream

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable


    public class CheckedOutputStream
    extends FilterOutputStream
    The CheckedOutputStream class is used to maintain a running checksum of all data written to a stream. The purpose of this checksum is to establish data integrity, by publishing the checksum to other parties wanting to read the non corrupted data.
    • Constructor Detail

      • CheckedOutputStream

        public CheckedOutputStream(OutputStream os,
                           Checksum cs)
        Constructs a new CheckedOutputStream on OutputStream os. The checksum is calculated using the algorithm implemented by csum.
        Parameters:
        os - the output stream to calculate checksum for.
        cs - an entity implementing the checksum algorithm.
    • Method Detail

      • getChecksum

        public Checksum getChecksum()
        Returns the checksum calculated on the stream read so far.
        Returns:
        the updated checksum.
      • write

        public void write(int val)
                   throws IOException
        Writes the specified byte to the underlying stream. The checksum is updated with val.
        Overrides:
        write in class FilterOutputStream
        Parameters:
        val - the data value to written to the output stream.
        Throws:
        IOException - if an IO error has occurred.
      • write

        public void write(byte[] buf,
                 int off,
                 int nbytes)
                   throws IOException
        Writes n bytes of data from buf starting at offset off to the underlying stream. The checksum is updated with the bytes written.
        Overrides:
        write in class FilterOutputStream
        Parameters:
        buf - data written to the output stream.
        off - the offset to start reading the data from buf written to the output stream.
        nbytes - number of bytes to write to the output stream.
        Throws:
        IOException - if an IO error has occurred.


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: 324 / 158677986. Delta: 0.05569 с