Java Zero Format zeroOut(byte[] array)

Here you can find the source of zeroOut(byte[] array)

Description

Overwrites a byte array with zeros

License

Open Source License

Declaration

public static void zeroOut(byte[] array) 

Method Source Code

//package com.java2s;
/**/*from   ww w  .ja v  a 2  s .  c o  m*/
 * Copyright (C) 2009  HungryHobo@mail.i2p
 * 
 * The GPG fingerprint for HungryHobo@mail.i2p is:
 * 6DD3 EAA2 9990 29BC 4AD2 7486 1E2C 7B61 76DC DC12
 * 
 * This file is part of I2P-Bote.
 * I2P-Bote is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * I2P-Bote is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with I2P-Bote.  If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    /** Overwrites a <code>byte</code> array with zeros */
    public static void zeroOut(byte[] array) {
        for (int i = 0; i < array.length; i++)
            array[i] = 0;
    }

    /** Overwrites a <code>char</code> array with zeros */
    public static void zeroOut(char[] array) {
        for (int i = 0; i < array.length; i++)
            array[i] = 0;
    }
}

Related

  1. zeroMatrix(int M, int N, double mat[][])
  2. zeroObjects()
  3. ZeroOneStringToBooleanArray(String data)
  4. zeroOrderBessel(float num)
  5. zeroOrMore(String... patterns)
  6. ZeroPoleFilter(float In[], int In_idx, float ZeroCoef[], float PoleCoef[], int PoleCoef_idx, int lengthInOut, int orderCoef, float Out[], int Out_idx)
  7. zeroPrefix(String str, int width)
  8. zeroPrepend(long num, int digits)
  9. ZeroRemover(String[] a)