code: public static byte [] head(final byte [] a, final int length) {
      if (a.length < length) {
        return null;
      }
      byte [] result = new byte[length];
      System.arraycopy(a, 0, result, 0, length);
      return result;
    }
docs: Returns first <code>length</code> bytes from byte array.
  @param a array
  @param length amount of bytes to grab
  @return First <code>length</code> bytes from <code>a</code>