Java Integer Pad Zero zeroPad(final int length, final byte[] bytes)

Here you can find the source of zeroPad(final int length, final byte[] bytes)

Description

zero Pad

License

Open Source License

Declaration

private static byte[] zeroPad(final int length, final byte[] bytes) 

Method Source Code

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

public class Main {
    private static byte[] zeroPad(final int length, final byte[] bytes) {
        final byte[] padded = new byte[length];
        System.arraycopy(bytes, 0, padded, 0, bytes.length);
        return padded;
    }/*from  w  ww .ja  v a2  s . co m*/
}

Related

  1. zeroPad(final byte[] data, final int blockSize)
  2. zeroPad(final int amount, final String in)
  3. zeropad(final int num, final int size)
  4. zeroPad(int i, int len)
  5. zeroPad(int n, int base, int width)
  6. zeroPad(int n, int len)