Package hec.appio
Class TextFileReference
java.lang.Object
hec.appio.TextFileReference
- All Implemented Interfaces:
hec.io.AsciiSerializable,Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptiongetFieldObject(Field fld) getValue()static StringgetValue(TextFileReference ref, String defaultVal) Useful when a TextFileReference is used along side a String field and only one object is meant to hold the current value.booleanreadValue(Identifier remoteId) booleansetFieldObject(Field fld, Object fobj) voidsetFilename(String filename) static StringsetValue(TextFileReference ref, String script) Useful when a TextFileReference is used along side a String field and only one object is meant to hold the current value.voidbooleanwriteValue(Identifier remoteId)
-
Constructor Details
-
TextFileReference
public TextFileReference() -
TextFileReference
-
-
Method Details
-
getValue
-
setValue
-
getFilename
-
setFilename
-
setFieldObject
- Specified by:
setFieldObjectin interfacehec.io.AsciiSerializable
-
getFieldObject
- Specified by:
getFieldObjectin interfacehec.io.AsciiSerializable
-
getValue
Useful when a TextFileReference is used along side a String field and only one object is meant to hold the current value. For example: String currentValue = TextFileReference.getValue(_initScriptRef, _initScript);- Parameters:
ref-defaultVal-- Returns:
- defaultVal if ref is null or ref contains a null value.
-
setValue
Useful when a TextFileReference is used along side a String field and only one object is meant to hold the current value. For example: _initScript = TextFileReference.setValue(_initScriptRef, script);Retrieving the value from the two fields can be accomplished like: String currentValue = TextFileReference.getValue(_initScriptRef, _initScript);
- Parameters:
ref-script-- Returns:
- null if ref value was updated. otherwise returns script value.
-
writeValue
- Throws:
IOException
-
readValue
- Throws:
IOException
-