Package opendap.dap

Class DString

    • Constructor Detail

      • DString

        public DString()
        Constructs a new DString.
      • DString

        public DString​(String n)
        Constructs a new DString with name n.
        Parameters:
        n - the name of the variable.
    • Method Detail

      • getValue

        public final String getValue()
        Get the current value as a String.
        Returns:
        the current value.
      • setValue

        public final void setValue​(String newVal)
        Set the current value.
        Parameters:
        newVal - the new value.
      • getTypeName

        public String getTypeName()
        Returns the OPeNDAP type name of the class instance as a String.
        Specified by:
        getTypeName in class BaseType
        Returns:
        the OPeNDAP type name of the class instance as a String.
      • printVal

        public void printVal​(PrintWriter os,
                             String space,
                             boolean print_decl_p)
        Prints the value of the variable, with its declaration. This function is primarily intended for debugging OPeNDAP applications and text-based clients such as geturl.
        Specified by:
        printVal in class BaseType
        Parameters:
        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.
        See Also:
        BaseType.printVal(PrintWriter, String, boolean)
      • externalize

        public void externalize​(DataOutputStream sink)
                         throws IOException
        Writes data to a 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.
        Specified by:
        externalize in interface ClientIO
        Parameters:
        sink - a DataOutputStream to write to.
        Throws:
        IOException - thrown on any OutputStream exception.