## dods.dap
Interface ClientIO

All Known Implementing Classes:
  DBoolean, DByte, DFloat32, DFloat64, DGrid, DInt16, DInt32, DSequence, DString, DStructure, DVector, PrimitiveVector

public interface ClientIO

Client-side serialization for DODS 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`).

See Also:
  `BaseType`, `DDS`

Method Summary
`void` `deserialize(DataInputStream source, ServerVersion sv, StatusUI statusUI)` Reads data from a `DataInputStream`.
`void` `externalize(DataOutputStream sink)` Writes data to a `DataOutputStream`.

Method Detail

### deserialize

    public void deserialize(DataInputStream source,
                            ServerVersion sv,
                            StatusUI statusUI)
                     throws IOException,
                            EOFException,
                            DataReadException

  Reads data from a `DataInputStream`. This method is only used on the client side of the DODS 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.
    `EOFException` - if EOF is found before the variable is completely deserialized.
    `IOException` - thrown on any other InputStream exception.
  See Also:
    `DataDDS`

### 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 DODS data, manipulate it, and then re-save it as a binary file.

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