public final class Utilities extends Object
Modifier and Type | Method and Description |
---|---|
static String |
adjustAttributeName(String attributeName)
Deprecated.
Use
ImageIOUtilities.adjustAttributeName(String) instead |
static void |
checkNotNull(Object checkMe,
String message)
Deprecated.
Use
ImageIOUtilities.checkNotNull(Object,String) instead |
static boolean |
equals(Object object1,
Object object2)
Deprecated.
Use
ImageIOUtilities.equals(Object,Object) instead |
static String |
getShortClassName(Object object)
Deprecated.
Use
ImageIOUtilities.getShortClassName(Object) instead |
static String |
getShortName(Class<?> classe)
Deprecated.
Use
ImageIOUtilities.getShortName(Class<?>) instead |
static int |
getSubSamplingFactor2(int xSubsamplingFactor,
int ySubsamplingFactor)
Deprecated.
Use
ImageIOUtilities.getSubSamplingFactor2(int,int) instead |
static boolean |
sameInterfaces(Class<?> object1,
Class<?> object2,
Class<?> base)
Deprecated.
|
static void |
setNativeAccelerationAllowed(String operation,
boolean allowed)
Deprecated.
|
static void |
setNativeAccelerationAllowed(String operation,
boolean allowed,
javax.media.jai.JAI jai)
Deprecated.
|
static String |
spaces(int length)
Deprecated.
Use
ImageIOUtilities.spaces(int) instead |
static File |
urlToFile(URL url)
Deprecated.
Use
ImageIOUtilities.urlToFile(URL) instead |
public static boolean equals(Object object1, Object object2)
ImageIOUtilities.equals(Object,Object)
insteadpublic static boolean sameInterfaces(Class<?> object1, Class<?> object2, Class<?> base)
ImageIOUtilities.sameInterfaces(Class<?>,Class<?>,Class<?>)
insteadtrue
if the two specified objects implements exactly the
same set of interfaces. Only interfaces assignable to base
are
compared. Declaration order doesn't matter. For example in ISO 19111,
different interfaces exist for different coordinate system geometries (CartesianCS
,
PolarCS
, etc.).public static String spaces(int length)
ImageIOUtilities.spaces(int)
insteadlength
- The string length. Negative values are clamped to 0.length
filled with white spaces.public static String getShortName(Class<?> classe)
ImageIOUtilities.getShortName(Class<?>)
insteadString
object. It will also name array
according Java language usage, for example "double[]" instead of "[D".classe
- The object class (may be null
).public static File urlToFile(URL url)
ImageIOUtilities.urlToFile(URL)
insteadurl
- a URL object that uses protocol "file"public static int getSubSamplingFactor2(int xSubsamplingFactor, int ySubsamplingFactor)
ImageIOUtilities.getSubSamplingFactor2(int,int)
insteadxSubsamplingFactor
- ySubsamplingFactor
- public static String getShortClassName(Object object)
ImageIOUtilities.getShortClassName(Object)
insteadString
object.object
- The object (may be null
).public static String adjustAttributeName(String attributeName)
ImageIOUtilities.adjustAttributeName(String)
insteadpublic static void setNativeAccelerationAllowed(String operation, boolean allowed, javax.media.jai.JAI jai)
ImageIOUtilities.setNativeAccelerationAllowed(String,boolean,JAI)
instead"Affine"
operation on
an image with float data type, bilinear interpolation and an ImageLayout
rendering hint cause an exception in medialib native code. Disabling the native acceleration
(i.e using the pure Java version) is a convenient workaround until Sun fix the bug.
Implementation note: the current implementation assumes that factories for
native implementations are declared in the com.sun.media.jai.mlib
package, while
factories for pure java implementations are declared in the com.sun.media.jai.opimage
package. It work for Sun's 1.1.2 implementation, but may change in future versions. If this
method doesn't recognize the package, it does nothing.
operation
- The operation name (e.g. "Affine"
).allowed
- false
to disallow native acceleration.jai
- The instance of JAI
we are going to work on. This argument can be
omitted for the default JAI instance.public static void setNativeAccelerationAllowed(String operation, boolean allowed)
ImageIOUtilities.setNativeAccelerationAllowed(String,boolean)
insteadsetNativeAccelerationAllowed(operation, allowed, JAI.getDefaultInstance())
.public static final void checkNotNull(Object checkMe, String message)
ImageIOUtilities.checkNotNull(Object,String)
insteadCopyright © 2006–2015 GeoSolutions. All rights reserved.