Here you can find the source of multiplyValues(byte[] array, int multiplier)
Parameter | Description |
---|---|
array | a parameter |
multiplier | a parameter |
public static byte[] multiplyValues(byte[] array, int multiplier)
//package com.java2s; public class Main { /**/*w ww .j av a 2 s .c om*/ * Multiply all values in the given array with the multiplier. * @param array * @param multiplier * @return Cloned version of the array. Not same object! */ public static byte[] multiplyValues(byte[] array, int multiplier) { byte[] newArray = new byte[array.length]; for (int i = 0; i < array.length; i++) { newArray[i] = (byte) (array[i] * multiplier); } return newArray; } }