Java Bit Unset unset(byte[] bytes)

Here you can find the source of unset(byte[] bytes)

Description

Unset an array of bytes.

License

Open Source License

Parameter

Parameter Description
bytes The actual array of bytes.

Declaration

public static void unset(byte[] bytes) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from  w  w w  . java 2  s  .co m*/
     * Unset an array of bytes.
     * 
     * @param bytes
     *            The actual array of bytes.
     */
    public static void unset(byte[] bytes) {
        for (int i = 0; i < bytes.length; i++) {
            bytes[i] = 0;
        }
    }

    /**
     * Unset an array of chars.
     * 
     * @param chars
     *            The actual array of chars.
     */
    public static void unset(char[] chars) {
        for (int i = 0; i < chars.length; i++) {
            chars[i] = 0;
        }
    }
}

Related

  1. unsetb(int num, int bitmask)
  2. UnsetBit(byte _bitset, byte bit)
  3. unsetBit(byte b, int pos)
  4. unsetBit(byte original, int bitToUnSet)