opendap.dap
Interface ClientIO

All Known Implementing Classes:
asciiArray, asciiByte, asciiF32, asciiF64, asciiGrid, asciiI16, asciiI32, asciiSeq, asciiString, asciiStructure, asciiUI16, asciiUI32, asciiURL, BaseTypePrimitiveVector, BooleanPrimitiveVector, BytePrimitiveVector, DArray, DataDDS, DByte, DDS, DFloat32, DFloat64, DGrid, DInt16, DInt32, DList, DSequence, DString, DStructure, DUInt16, DUInt32, DURL, DVector, Float32PrimitiveVector, Float64PrimitiveVector, Int16PrimitiveVector, Int32PrimitiveVector, PrimitiveVector, SDArray, SDByte, SDFloat32, SDFloat64, SDGrid, SDInt16, SDInt32, SDList, SDSequence, SDString, SDStructure, SDUInt16, SDUInt32, SDURL, ServerDDS, test_SDArray, test_SDByte, test_SDFloat32, test_SDFloat64, test_SDGrid, test_SDInt16, test_SDInt32, test_SDSequence, test_SDString, test_SDStructure, test_SDUInt16, test_SDUInt32, test_SDURL, UInt16PrimitiveVector, UInt32PrimitiveVector, wwwArray, wwwByte, wwwF32, wwwF64, wwwGrid, wwwI16, wwwI32, wwwSequence, wwwString, wwwStructure, wwwUI16, wwwUI32, wwwURL

public interface ClientIO

Client-side serialization for OPeNDAP variables (sub-classes of BaseType). This does not send the entire class as the Java Serializable interface does, rather it sends only the binary data values. Other software is responsible for sending variable type information (see DDS).

Version:
$Revision: 23881 $
Author:
jehamby
See Also:
BaseType, DDS

Method Summary
 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.
 

Method Detail

deserialize

void deserialize(java.io.DataInputStream source,
                 ServerVersion sv,
                 StatusUI statusUI)
                 throws java.io.IOException,
                        java.io.EOFException,
                        DataReadException
Reads data from a DataInputStream. This method is only used on the client side of the OPeNDAP client/server connection.

Parameters:
source - a DataInputStream to read from.
sv - The ServerVersion returned by the server. (used by DSequence to determine which protocol version was used).
statusUI - The StatusUI object to use for GUI updates and user cancellation notification (may be null).
Throws:
DataReadException - when invalid data is read, or if the user cancels the download.
java.io.EOFException - if EOF is found before the variable is completely deserialized.
java.io.IOException - thrown on any other InputStream exception.
See Also:
DataDDS

externalize

void externalize(java.io.DataOutputStream sink)
                 throws java.io.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.

Parameters:
sink - a DataOutputStream to write to.
Throws:
java.io.IOException - thrown on any OutputStream exception.