public class DString extends DPrimitive implements ClientIO
String value.BaseType,
Serialized FormDAPNode.CloneMap_nameClear, _nameEncoded, log| Constructor and Description |
|---|
DString()
Constructs a new
DString. |
DString(java.lang.String n)
Constructs a new
DString with name n. |
| Modifier and Type | Method and Description |
|---|---|
void |
deserialize(java.io.DataInputStream source,
ServerVersion sv,
StatusUI statusUI)
Reads data from a
DataInputStream. |
void |
externalize(java.io.DataOutputStream sink)
Writes data to a
DataOutputStream. |
java.lang.String |
getTypeName()
Returns the OPeNDAP type name of the class instance as a
String. |
java.lang.String |
getValue()
Get the current value as a
String. |
void |
printConstraint(java.io.PrintWriter os) |
void |
printVal(java.io.PrintWriter os,
java.lang.String space,
boolean print_decl_p)
Prints the value of the variable, with its declaration.
|
void |
setValue(java.lang.String newVal)
Set the current value.
|
addAttributeAlias, addAttributeContainer, appendAttribute, appendAttribute, appendAttributeContainer, checkSemantics, checkSemantics, cloneDAG, delAttribute, delAttribute, elementCount, elementCount, getAttribute, getAttribute, getAttributeNames, getAttributeTable, getLongName, hasAttributes, newPrimitiveVector, printAttributes, printAttributes, printAttributes, printAttributes, printDecl, printDecl, printDecl, printDecl, printDecl, printDecl, printDecl, printDecl, printVal, printVal, printVal, printXML, printXML, printXML, printXML, printXML, setClearNameclone, cloneDAG, getClearName, getEncodedName, getParent, isProject, setEncodedName, setParent, setProject, setProject, setProjectedpublic DString()
DString.public DString(java.lang.String n)
DString with name n.n - the name of the variable.public final java.lang.String getValue()
String.public final void setValue(java.lang.String newVal)
newVal - the new value.public java.lang.String getTypeName()
String.getTypeName in class BaseTypeString.public void printVal(java.io.PrintWriter os,
java.lang.String space,
boolean print_decl_p)
printVal in class BaseTypeos - the PrintWriter on which to print the value.space - this value is passed to the printDecl method,
and controls the leading spaces of the output.print_decl_p - a boolean value controlling whether the
variable declaration is printed as well as the value.BaseType.printVal(PrintWriter, String, boolean)public void deserialize(java.io.DataInputStream source,
ServerVersion sv,
StatusUI statusUI)
throws java.io.IOException,
java.io.EOFException,
DataReadException
DataInputStream. This method is only used
on the client side of the OPeNDAP client/server connection.deserialize in interface ClientIOsource - a DataInputStream to read from.sv - the ServerVersion returned by the server.statusUI - the StatusUI object to use for GUI updates
and user cancellation notification (may be null).java.io.EOFException - if EOF is found before the variable is completely
deserialized.java.io.IOException - thrown on any other InputStream exception.DataReadException - if a negative string length was read.ClientIO.deserialize(DataInputStream, ServerVersion, StatusUI)public void externalize(java.io.DataOutputStream sink)
throws java.io.IOException
DataOutputStream. This method is used
primarily by GUI clients which need to download OPeNDAP data, manipulate
it, and then re-save it as a binary file.externalize in interface ClientIOsink - a DataOutputStream to write to.java.io.IOException - thrown on any OutputStream
exception.public void printConstraint(java.io.PrintWriter os)
printConstraint in class BaseType