jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java
changeset 43852 93a527059d8a
parent 28326 2b9860c0d68a
equal deleted inserted replaced
43752:3c68ef249093 43852:93a527059d8a
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2017, 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                                        // CRLFs should not be inserted
    53                                        // CRLFs should not be inserted
    54     }
    54     }
    55 
    55 
    56     /**
    56     /**
    57      * Returns the length of the encoded version of this byte array.
    57      * Returns the length of the encoded version of this byte array.
       
    58      *
       
    59      * @param b byte array.
       
    60      *
       
    61      * @return length of the byte array.
    58      */
    62      */
    59     public static int encodedLength(byte[] b) {
    63     public static int encodedLength(byte[] b) {
    60         return ((b.length + 2)/3) * 4;
    64         return ((b.length + 2)/3) * 4;
    61     }
    65     }
    62 }
    66 }