The list of methods to do Zero Format are organized into topic(s).
void
zero(byte[] bytes, int off, int len) Zeroes all bytes between off (inclusive) and off + len (exclusive) in the given array.
int remaining = len;
while (remaining > ARRAY_LEN) {
System.arraycopy(ZERO_ARRAY, 0, bytes, off, ARRAY_LEN);
off += ARRAY_LEN;
remaining -= ARRAY_LEN;
System.arraycopy(ZERO_ARRAY, 0, bytes, off, remaining);
void
zero(double[] zero) Sets every value of the passed array to 0.
for (int k = 0; k < zero.length; k++) {
zero[k] = 0;
long[]
zero(int bits) Allocate a new long[].
return new long[((bits - 1) >>> LONG_LOG2_SIZE) + 1];
String
zero(int x) zero
String s = Integer.toHexString(x & 0xFF);
if (s.length() == 1)
return "0" + s;
else
return s;
byte[]
zero_pad(byte[] original, int block_size) Return a new array equal to original except zero-padded to an integral mulitple of blocks.
if ((original.length % block_size) == 0) {
return original;
byte[] result = new byte[round_up(original.length, block_size)];
memcpy(result, 0, original, 0, original.length);
return result;
String
zeroAlign(String x, int count) zero Align
if (x.length() < count) {
int spaces = count - x.length();
StringBuilder result = new StringBuilder(count);
while (spaces > 0) {
result.append("0");
spaces--;
result.append(x);
...