jdk/src/share/classes/org/jcp/xml/dsig/internal/DigesterOutputStream.java
changeset 1337 e8d6cef36199
parent 2 90ce3da70b43
child 1639 a97859015238
equal deleted inserted replaced
1334:21b652819b97 1337:e8d6cef36199
    17  *  See the License for the specific language governing permissions and
    17  *  See the License for the specific language governing permissions and
    18  *  limitations under the License.
    18  *  limitations under the License.
    19  *
    19  *
    20  */
    20  */
    21 /*
    21 /*
    22  * $Id: DigesterOutputStream.java,v 1.1.2.2 2005/08/12 18:15:35 mullan Exp $
    22  * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
       
    23  */
       
    24 /*
       
    25  * $Id: DigesterOutputStream.java,v 1.2 2008/07/24 15:20:31 mullan Exp $
    23  */
    26  */
    24 package org.jcp.xml.dsig.internal;
    27 package org.jcp.xml.dsig.internal;
    25 
    28 
    26 import java.io.ByteArrayInputStream;
    29 import java.io.ByteArrayInputStream;
    27 import java.io.InputStream;
    30 import java.io.InputStream;
    33 import com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream;
    36 import com.sun.org.apache.xml.internal.security.utils.UnsyncByteArrayOutputStream;
    34 
    37 
    35 /**
    38 /**
    36  * This class has been modified slightly to use java.security.MessageDigest
    39  * This class has been modified slightly to use java.security.MessageDigest
    37  * objects as input, rather than
    40  * objects as input, rather than
    38  * org.apache.xml.security.algorithms.MessageDigestAlgorithm objects.
    41  * com.sun.org.apache.xml.internal.security.algorithms.MessageDigestAlgorithm objects.
    39  * It also optionally caches the input bytes.
    42  * It also optionally caches the input bytes.
    40  *
    43  *
    41  * @author raul
    44  * @author raul
       
    45  * @author Sean Mullan
    42  */
    46  */
    43 public class DigesterOutputStream extends OutputStream {
    47 public class DigesterOutputStream extends OutputStream {
    44     private boolean buffer = false;
    48     private boolean buffer = false;
    45     private UnsyncByteArrayOutputStream bos;
    49     private UnsyncByteArrayOutputStream bos;
    46     private final MessageDigest md;
    50     private final MessageDigest md;