/** * Prints the contents of the TRE to the given PrintStream * * @param stream PrintStream to print to * @throws NITFException */ public void print(PrintStream stream) throws NITFException { stream.println("\n---------------" + getTag() + "---------------"); for (TREIterator it = iterator(); it.hasNext(); ) { FieldPair pair = it.next(); String desc = it.getFieldDescription(); Field field = pair.getField(); stream.println( pair.getName() + (desc != null ? (" (" + desc + ")") : "") + " = [" + (field.getType() == FieldType.NITF_BINARY ? ("<binary stuff, length = " + field.getLength() + ">") : field.toString()) + "]"); } stream.println("------------------------------------"); }
public static void setDeclaredValue(Class<?> clazz, Object instance, FieldPair pair) throws Exception { setDeclaredValue(clazz, instance, pair.getName(), pair.getValue()); }
public static void setDeclaredValue( String className, SubPackageType type, Object instance, FieldPair pair) throws Exception { setDeclaredValue(className, type, instance, pair.getName(), pair.getValue()); }
public static void setValue(Object instance, FieldPair pair) throws Exception { setValue(instance, pair.getName(), pair.getValue()); }