opendap/src/main/java/opendap/dap/DSequence.java
public synchronized void deserialize(DataInputStream source,
                                         ServerVersion sv,
                                         StatusUI statusUI)
            throws IOException, DataReadException {

        //LogStream.out.println("ServerVersion.getMajor() "+sv.getMajor()+"  ServerVersion.getMinor(): "+sv.getMinor());

        // check for old servers
        if (sv != null && (sv.getMajor() < 2 || (sv.getMajor() == 2 && sv.getMinor() < 15))) {
            //LogStream.out.println("Using oldDeserialize() mechanism.");
            oldDeserialize(source, sv, statusUI);
        } else {
            //LogStream.out.println("Using new deserialize() mechanism.");

// ************* Pulled out the getLevel() check in order to support the "new"
// and "improved" serialization of OPeNDAP sequences. 8/31/01 ndp
//            // top level of sequence handles start and end markers
//            if (getLevel() == 0) {
            // loop until end of sequence
            for (; ;) {

                byte marker = readMarker(source);

                if (statusUI != null)
                    statusUI.incrementByteCount(4);

                if (marker == START_OF_INSTANCE)
                    deserializeSingle(source, sv, statusUI);
                else if (marker == END_OF_SEQUENCE)
                    break;
                else
                    throw new DataReadException("Sequence start marker not found");
            }
// ************* Pulled out the getLevel() check in order to support the "new"
// and "improved" serialization of OPeNDAP sequences. 8/31/01 ndp
//            }
//	    else {
//                // lower levels only deserialize a single instance at a time
//                deserializeSingle(source, sv, statusUI);
//            }
        }
    }
public synchronized void deserialize(DataInputStream source,
                                         ServerVersion sv,
                                         StatusUI statusUI)
            throws IOException, DataReadException {

        //LogStream.out.println("ServerVersion.getMajor() "+sv.getMajor()+"  ServerVersion.getMinor(): "+sv.getMinor());

        // check for old servers
        if (sv != null && (sv.getMajor() < 2 || (sv.getMajor() == 2 && sv.getMinor() < 15))) {
            //LogStream.out.println("Using oldDeserialize() mechanism.");
            oldDeserialize(source, sv, statusUI);
        } else {
            //LogStream.out.println("Using new deserialize() mechanism.");

// ************* Pulled out the getLevel() check in order to support the "new"
// and "improved" serialization of OPeNDAP sequences. 8/31/01 ndp
//            // top level of sequence handles start and end markers
//            if (getLevel() == 0) {
            // loop until end of sequence
            for (; ;) {

                byte marker = readMarker(source);

                if (statusUI != null)
                    statusUI.incrementByteCount(4);

                if (marker == START_OF_INSTANCE)
                    deserializeSingle(source, sv, statusUI);
                else if (marker == END_OF_SEQUENCE)
                    break;
                else
                    throw new DataReadException("Sequence start marker not found");
            }
// ************* Pulled out the getLevel() check in order to support the "new"
// and "improved" serialization of OPeNDAP sequences. 8/31/01 ndp
//            }
//	    else {
//                // lower levels only deserialize a single instance at a time
//                deserializeSingle(source, sv, statusUI);
//            }
        }
    }
public synchronized void deserialize ( DataInputStream source , ServerVersion sv , StatusUI statusUI ) throws IOException , DataReadException { //LogStream.out.println("ServerVersion.getMajor() "+sv.getMajor()+"  ServerVersion.getMinor(): "+sv.getMinor());
 // check for old servers
 if ( sv != null && ( sv . getMajor ( ) < 2 || ( sv . getMajor ( ) == 2 && sv . getMinor ( ) < 15 ) ) ) { //LogStream.out.println("Using oldDeserialize() mechanism.");
 oldDeserialize ( source , sv , statusUI ) ; } else { //LogStream.out.println("Using new deserialize() mechanism.");
 // ************* Pulled out the getLevel() check in order to support the "new"
 // and "improved" serialization of OPeNDAP sequences. 8/31/01 ndp
 //            // top level of sequence handles start and end markers
 //            if (getLevel() == 0) {
 // loop until end of sequence
 for ( ; ; ) { byte marker = readMarker ( source ) ; if ( statusUI != null ) statusUI . incrementByteCount ( 4 ) ; if ( marker == START_OF_INSTANCE ) deserializeSingle ( source , sv , statusUI ) ; else if ( marker == END_OF_SEQUENCE ) break ; else throw new DataReadException ( "Sequence start marker not found" ) ; } // ************* Pulled out the getLevel() check in order to support the "new"
 // and "improved" serialization of OPeNDAP sequences. 8/31/01 ndp
 //            }
 //	    else {
 //                // lower levels only deserialize a single instance at a time
 //                deserializeSingle(source, sv, statusUI);
 //            }
 } }
Reads data from a <code>DataInputStream</code>. This method is only used
on the client side of the OPeNDAP client/server connection.

@param source   a <code>DataInputStream</code> to read from.
@param sv       the <code>ServerVersion</code> returned by the server.
@param statusUI the <code>StatusUI</code> object to use for GUI updates
and user cancellation notification (may be null).
@throws EOFException      if EOF is found before the variable is completely
deserialized.
@throws IOException       thrown on any other InputStream exception.
@throws DataReadException if an unexpected value was read.
@see ClientIO#deserialize(DataInputStream, ServerVersion, StatusUI)
Reads data from a <code > DataInputStream< / code > . This method is only used on the client side of the OPeNDAP client / server connection .