src/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -804,18 +804,15 @@
int idata[] = null; // buffer for int data
// the sampleModel can be null in case of embedded image
if (sampleModel != null) {
if (sampleModel.getDataType() == DataBuffer.TYPE_BYTE)
- bdata = (byte[])
- ((DataBufferByte)raster.getDataBuffer()).getData();
+ bdata = ((DataBufferByte)raster.getDataBuffer()).getData();
else if (sampleModel.getDataType() == DataBuffer.TYPE_USHORT)
- sdata = (short[])
- ((DataBufferUShort)raster.getDataBuffer()).getData();
+ sdata = ((DataBufferUShort)raster.getDataBuffer()).getData();
else if (sampleModel.getDataType() == DataBuffer.TYPE_INT)
- idata = (int[])
- ((DataBufferInt)raster.getDataBuffer()).getData();
+ idata = ((DataBufferInt)raster.getDataBuffer()).getData();
}
// There should only be one tile.
switch(imageType) {