|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopendap.dap.DAPNode
opendap.dap.BaseType
opendap.dap.DString
public class DString
Holds a OPeNDAP String
value.
BaseType
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class opendap.dap.DAPNode |
---|
DAPNode.CloneMap |
Field Summary |
---|
Fields inherited from class opendap.dap.DAPNode |
---|
_name, _nameEncoded |
Constructor Summary | |
---|---|
DString()
Constructs a new DString . |
|
DString(String n)
Constructs a new DString with name n . |
Method Summary | |
---|---|
void |
deserialize(DataInputStream source,
ServerVersion sv,
StatusUI statusUI)
Reads data from a DataInputStream . |
void |
externalize(DataOutputStream sink)
Writes data to a DataOutputStream . |
String |
getTypeName()
Returns the OPeNDAP type name of the class instance as a String . |
String |
getValue()
Get the current value as a String . |
void |
printConstraint(PrintWriter os)
|
void |
printVal(PrintWriter os,
String space,
boolean print_decl_p)
Prints the value of the variable, with its declaration. |
void |
setValue(String newVal)
Set the current value. |
Methods inherited from class opendap.dap.DAPNode |
---|
clone, cloneDAG, getClearName, getEncodedName, getParent, isProject, setEncodedName, setParent, setProject, setProject, setProjected |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DString()
DString
.
public DString(String n)
DString
with name n
.
n
- the name of the variable.Method Detail |
---|
public final String getValue()
String
.
public final void setValue(String newVal)
newVal
- the new value.public String getTypeName()
String
.
getTypeName
in class BaseType
String
.public void printVal(PrintWriter os, String space, boolean print_decl_p)
printVal
in class BaseType
os
- 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(DataInputStream source, ServerVersion sv, StatusUI statusUI) throws IOException, EOFException, DataReadException
DataInputStream
. This method is only used
on the client side of the OPeNDAP client/server connection.
deserialize
in interface ClientIO
source
- 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).
EOFException
- if EOF is found before the variable is completely
deserialized.
IOException
- thrown on any other InputStream exception.
DataReadException
- if a negative string length was read.ClientIO.deserialize(DataInputStream, ServerVersion, StatusUI)
public void externalize(DataOutputStream sink) throws 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 ClientIO
sink
- a DataOutputStream
to write to.
IOException
- thrown on any OutputStream
exception.public void printConstraint(PrintWriter os)
printConstraint
in class BaseType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |