jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java
equal
deleted
inserted
replaced
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 } |