下面列出了java.awt.image.SampleModel#getDataElements() 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}
public static void main(String[] args) {
SampleModel sm = new ComponentSampleModel(dataType, width, height, 4, width * 4, new int[] { 0, 1, 2, 3 } );
DataBuffer db = sm.createDataBuffer();
Object o = null;
boolean testPassed = false;
try {
o = sm.getDataElements(Integer.MAX_VALUE, 0, 1, 1, o, db);
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println(e.getMessage());
testPassed = true;
}
if (!testPassed) {
throw new RuntimeException("Excpected excprion was not thrown.");
}
}