< prev index next >
src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 58,71 ****
* </a>
*/
public final class DataBufferUShort extends DataBuffer
{
/** The default data bank. */
! short data[];
/** All data banks */
! short bankdata[][];
/**
* Constructs an unsigned-short based {@code DataBuffer} with a single bank and the
* specified size.
*
--- 58,71 ----
* </a>
*/
public final class DataBufferUShort extends DataBuffer
{
/** The default data bank. */
! short[] data;
/** All data banks */
! short[][] bankdata;
/**
* Constructs an unsigned-short based {@code DataBuffer} with a single bank and the
* specified size.
*
*** 107,117 ****
* an associated image in video memory).
*
* @param dataArray The unsigned-short array for the {@code DataBuffer}.
* @param size The size of the {@code DataBuffer} bank.
*/
! public DataBufferUShort(short dataArray[], int size) {
super(UNTRACKABLE, TYPE_USHORT, size);
if (dataArray == null) {
throw new NullPointerException("dataArray is null");
}
data = dataArray;
--- 107,117 ----
* an associated image in video memory).
*
* @param dataArray The unsigned-short array for the {@code DataBuffer}.
* @param size The size of the {@code DataBuffer} bank.
*/
! public DataBufferUShort(short[] dataArray, int size) {
super(UNTRACKABLE, TYPE_USHORT, size);
if (dataArray == null) {
throw new NullPointerException("dataArray is null");
}
data = dataArray;
*** 133,143 ****
*
* @param dataArray The unsigned-short array for the {@code DataBuffer}.
* @param size The size of the {@code DataBuffer} bank.
* @param offset The offset into the {@code dataArray}.
*/
! public DataBufferUShort(short dataArray[], int size, int offset) {
super(UNTRACKABLE, TYPE_USHORT, size, 1, offset);
if (dataArray == null) {
throw new NullPointerException("dataArray is null");
}
if ((size+offset) > dataArray.length) {
--- 133,143 ----
*
* @param dataArray The unsigned-short array for the {@code DataBuffer}.
* @param size The size of the {@code DataBuffer} bank.
* @param offset The offset into the {@code dataArray}.
*/
! public DataBufferUShort(short[] dataArray, int size, int offset) {
super(UNTRACKABLE, TYPE_USHORT, size, 1, offset);
if (dataArray == null) {
throw new NullPointerException("dataArray is null");
}
if ((size+offset) > dataArray.length) {
*** 161,171 ****
* an associated image in video memory).
*
* @param dataArray The unsigned-short arrays for the {@code DataBuffer}.
* @param size The size of the banks in the {@code DataBuffer}.
*/
! public DataBufferUShort(short dataArray[][], int size) {
super(UNTRACKABLE, TYPE_USHORT, size, dataArray.length);
if (dataArray == null) {
throw new NullPointerException("dataArray is null");
}
for (int i=0; i < dataArray.length; i++) {
--- 161,171 ----
* an associated image in video memory).
*
* @param dataArray The unsigned-short arrays for the {@code DataBuffer}.
* @param size The size of the banks in the {@code DataBuffer}.
*/
! public DataBufferUShort(short[][] dataArray, int size) {
super(UNTRACKABLE, TYPE_USHORT, size, dataArray.length);
if (dataArray == null) {
throw new NullPointerException("dataArray is null");
}
for (int i=0; i < dataArray.length; i++) {
*** 195,205 ****
*
* @param dataArray The unsigned-short arrays for the {@code DataBuffer}.
* @param size The size of the banks in the {@code DataBuffer}.
* @param offsets The offsets into each array.
*/
! public DataBufferUShort(short dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_USHORT, size, dataArray.length, offsets);
if (dataArray == null) {
throw new NullPointerException("dataArray is null");
}
for (int i=0; i < dataArray.length; i++) {
--- 195,205 ----
*
* @param dataArray The unsigned-short arrays for the {@code DataBuffer}.
* @param size The size of the banks in the {@code DataBuffer}.
* @param offsets The offsets into each array.
*/
! public DataBufferUShort(short[][] dataArray, int size, int[] offsets) {
super(UNTRACKABLE, TYPE_USHORT, size, dataArray.length, offsets);
if (dataArray == null) {
throw new NullPointerException("dataArray is null");
}
for (int i=0; i < dataArray.length; i++) {
< prev index next >