< prev index next >

src/java.desktop/macosx/classes/sun/java2d/DataBufferNIOInt.java

Print this page

        

*** 35,59 **** /** All data banks */ IntBuffer bankdata[]; /** ! * Constructs an integer-based <CODE>DataBuffer</CODE> with a single bank * and the specified size. * ! * @param size The size of the <CODE>DataBuffer</CODE>. */ public DataBufferNIOInt(int size) { super(TYPE_INT,size); //+++gdb how to get sizeof(int) in java? Using 4 for now. data = getBufferOfSize(size * 4).asIntBuffer(); bankdata = new IntBuffer[1]; bankdata[0] = data; } /** ! * Returns the default (first) IntBuffer in <CODE>DataBuffer</CODE>. * * @return The first IntBuffer. */ public IntBuffer getBuffer() { return data; --- 35,59 ---- /** All data banks */ IntBuffer bankdata[]; /** ! * Constructs an integer-based {@code DataBuffer} with a single bank * and the specified size. * ! * @param size The size of the {@code DataBuffer}. */ public DataBufferNIOInt(int size) { super(TYPE_INT,size); //+++gdb how to get sizeof(int) in java? Using 4 for now. data = getBufferOfSize(size * 4).asIntBuffer(); bankdata = new IntBuffer[1]; bankdata[0] = data; } /** ! * Returns the default (first) IntBuffer in {@code DataBuffer}. * * @return The first IntBuffer. */ public IntBuffer getBuffer() { return data;
*** 68,78 **** public IntBuffer getBuffer(int bank) { return bankdata[bank]; } /** ! * Returns the default (first) int data array in <CODE>DataBuffer</CODE>. * * @return The first integer data array. */ public int[] getData() { return data.array(); --- 68,78 ---- public IntBuffer getBuffer(int bank) { return bankdata[bank]; } /** ! * Returns the default (first) int data array in {@code DataBuffer}. * * @return The first integer data array. */ public int[] getData() { return data.array();
*** 135,145 **** data.put(i+offset, val); } /** * Sets the requested data array element in the specified bank ! * to the integer value <CODE>i</CODE>. * @param bank The bank in which you want to set the data array element. * @param i The data array element you want to set. * @param val The integer value to which you want to set the specified data array element. * @see #getElem(int) * @see #getElem(int, int) --- 135,145 ---- data.put(i+offset, val); } /** * Sets the requested data array element in the specified bank ! * to the integer value {@code i}. * @param bank The bank in which you want to set the data array element. * @param i The data array element you want to set. * @param val The integer value to which you want to set the specified data array element. * @see #getElem(int) * @see #getElem(int, int)
< prev index next >