src/java.base/share/classes/java/util/zip/CheckedOutputStream.java
changeset 58242 94bb65cb37d3
parent 47216 71c04702a3d5
child 59201 b24f4caa1411
equal deleted inserted replaced
58241:33de7752835c 58242:94bb65cb37d3
     1 /*
     1 /*
     2  * Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    53     }
    53     }
    54 
    54 
    55     /**
    55     /**
    56      * Writes a byte. Will block until the byte is actually written.
    56      * Writes a byte. Will block until the byte is actually written.
    57      * @param b the byte to be written
    57      * @param b the byte to be written
    58      * @exception IOException if an I/O error has occurred
    58      * @throws    IOException if an I/O error has occurred
    59      */
    59      */
    60     public void write(int b) throws IOException {
    60     public void write(int b) throws IOException {
    61         out.write(b);
    61         out.write(b);
    62         cksum.update(b);
    62         cksum.update(b);
    63     }
    63     }
    66      * Writes an array of bytes. Will block until the bytes are
    66      * Writes an array of bytes. Will block until the bytes are
    67      * actually written.
    67      * actually written.
    68      * @param b the data to be written
    68      * @param b the data to be written
    69      * @param off the start offset of the data
    69      * @param off the start offset of the data
    70      * @param len the number of bytes to be written
    70      * @param len the number of bytes to be written
    71      * @exception IOException if an I/O error has occurred
    71      * @throws    IOException if an I/O error has occurred
    72      */
    72      */
    73     public void write(byte[] b, int off, int len) throws IOException {
    73     public void write(byte[] b, int off, int len) throws IOException {
    74         out.write(b, off, len);
    74         out.write(b, off, len);
    75         cksum.update(b, off, len);
    75         cksum.update(b, off, len);
    76     }
    76     }