-
Enhancement
-
Resolution: Fixed
-
P3
-
1.4.0
-
beta3
-
generic
-
generic
Name: bsC130419 Date: 08/30/2001
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)
ImageInputStream.setByteOrder(...) expect a boolean argument: "true" for
network (big-endian) byte order, and "false" for reverse (little-endian) byte
order. Such a convention is not really obvious. A type-safe enumeration would
be more explicit.
Such an enumeration already exist: the java.nio.ByteOrder class, which provide
only two static fields: BIG_ENDIAN and LITTLE_ENDIAN. Because this enumeration
already exists in JDK 1.4 and is just waiting to be used, I suggest to make the
following replacements:
Replace
void ImageInputStream.setByteOrder(boolean)
by
void ImageInputStream.setByteOrder(ByteOrder)
Replace
boolean ImageInputStream.getByteOrder()
by
ByteOrder ImageInputStream.getByteOrder()
(Review ID: 131076)
======================================================================