|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectNITFUtilities
public class NITFUtilities
Utility class storing default values and constants, as well as a set of methods to do fields setting, field validation and compression parameters management.
Nested Class Summary | |
---|---|
static class |
NITFUtilities.Consts
Constants |
static class |
NITFUtilities.WriteCompression
|
Constructor Summary | |
---|---|
NITFUtilities()
|
Method Summary | |
---|---|
static JP2KKakaduImageWriteParam |
getCompressionParam(JP2KKakaduImageWriter kakaduWriter,
NITFUtilities.WriteCompression compression,
boolean isMulti)
Setup a proper set of JP2K writing parameters depending on the type of requested compression. |
static boolean |
isNITFAvailable()
Returns true if the NITF native library has been loaded. |
static void |
loadNITF()
Forces loading of NITF libs. |
static void |
setField(String fieldName,
Field field,
byte[] fieldValue)
Set the specified fieldName, represented by the specified Field, with the provided fieldValue Note that the fieldName parameter is only used for logging/exceptions purposes. |
static void |
setField(String fieldName,
Field field,
byte[] fieldValue,
boolean doValidation)
Set the specified fieldName, represented by the specified Field, with the provided fieldValue Note that the fieldName parameter is only used for logging/exceptions purposes. |
static void |
setField(String fieldName,
Field field,
String fieldValue)
Set the specified fieldName, represented by the specified Field, with the provided fieldValue Note that the fieldName parameter is only used for logging/exceptions purposes. |
static void |
setField(String fieldName,
Field field,
String fieldValue,
boolean doValidation)
Set the specified fieldName, represented by the specified Field, with the provided fieldValue Note that the fieldName parameter is only used for logging/exceptions purposes. |
static void |
setTREField(TRE tre,
String fieldName,
String fieldValue,
boolean doValidation)
Set a field in the specified TRE |
static void |
setTREFieldDirect(TRE tre,
String fieldName,
String fieldValue)
Set a field in the specified TRE |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NITFUtilities()
Method Detail |
---|
public static boolean isNITFAvailable()
true
if the NITF native library has been loaded. false
otherwise.
true
only if the NITF native library has been loaded.public static void loadNITF()
public static JP2KKakaduImageWriteParam getCompressionParam(JP2KKakaduImageWriter kakaduWriter, NITFUtilities.WriteCompression compression, boolean isMulti)
kakaduWriter
- a writer instance to get default write parameters.compression
- the type of NITFUtilities.WriteCompression
desiredisMulti
- whether the image to be compressed is multi band or pancromatic.
JP2KKakaduImageWriteParam
instance with proper writing parameters.public static void setTREField(TRE tre, String fieldName, String fieldValue, boolean doValidation) throws NITFException
tre
- the TRE to be setfieldName
- the name of the field to be setfieldValue
- the value to be set for that fielddoValidation
- true
to check if the provided value is compliant
with the field properties (length and type).
NITFException
public static void setTREFieldDirect(TRE tre, String fieldName, String fieldValue) throws NITFException
tre
- the TRE to be setfieldName
- the name of the field to be setfieldValue
- the value to be set for that field
NITFException
#setTREField(TRE, String, String, boolean)}
public static void setField(String fieldName, Field field, String fieldValue)
fieldName
- the name to be shown in case some exception occursfield
- the field to be setfieldValue
- the value, as a String
, to be assigned to that fieldpublic static void setField(String fieldName, Field field, byte[] fieldValue)
fieldName
- the name to be shown in case some exception occursfield
- the field to be setfieldValue
- the value, as a byte[]
, to be assigned to that fieldpublic static void setField(String fieldName, Field field, String fieldValue, boolean doValidation)
doValidation
param.
fieldName
- the name to be shown in case some exception occursfield
- the field to be setfieldValue
- the value, as a String
, to be assigned to that fielddoValidation
- if true
check the fieldValue is compliant with the field
propertiespublic static void setField(String fieldName, Field field, byte[] fieldValue, boolean doValidation)
doValidation
param.
fieldName
- the name to be shown in case some exception occursfield
- the field to be setfieldValue
- the value, as a String
, to be assigned to that fielddoValidation
- if true
check the fieldValue is compliant with the field
properties
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |