public void setPixel(int x, int y, int[] iArray, DataBuffer data) { if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) { throw new ArrayIndexOutOfBoundsException("Coordinate out of bounds!"); } int bitnum = dataBitOffset + x * pixelBitStride; int index = y * scanlineStride + (bitnum / dataElementSize); int shift = dataElementSize - (bitnum & (dataElementSize - 1)) - pixelBitStride; int element = data.getElem(index); element &= ~(bitMask << shift); element |= (iArray[0] & bitMask) << shift; data.setElem(index, element); }
public void setPixel(int x, int y, int[] iArray, DataBuffer data) { setSample(x, y, 0, iArray[0], data); }
	public void setPixel(int x, int y, int[] iArray, DataBuffer data) {		if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {			throw new ArrayIndexOutOfBoundsException("Coordinate out of bounds!");		}		int bitnum = dataBitOffset + x * pixelBitStride;		int index = y * scanlineStride + (bitnum / dataElementSize);		int shift = dataElementSize - (bitnum & (dataElementSize - 1)) - pixelBitStride;		int element = data.getElem(index);		element &= ~(bitMask << shift);		element |= (iArray[0] & bitMask) << shift;		data.setElem(index, element);	}