Java Utililty Methods Zero Format

List of utility methods to do Zero Format

  1. HOME
  2. Java
  3. Z
  4. Zero Format

Description

The list of methods to do Zero Format are organized into topic(s).

Method

void zero(byte[] a, int aoffset, int len)
zero
fill((byte) 0, a, aoffset, len);
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(byte[]... arrays)
zero
for (byte[] ba : arrays)
 set(ba, 0, ba.length, (byte) 0);
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);
...
int zeroBasedTemplateStart(final int[] actions)
Zero-based start position on template.
return actions[TEMPLATE_START_INDEX];
void zeroBlock(byte[] block, int off, int len)
zero Block
for (int i = off; i < off + len; ++i)
 block[i] = 0;


AltStyle によって変換されたページ (->オリジナル) /