cdm/src/main/java/ucar/nc2/stream/NcStreamReader.java
public StructureDataIterator getStructureIterator(InputStream is, NetcdfFile ncfile) throws IOException {
    if (!NcStream.readAndTest(is, NcStream.MAGIC_DATA))
      throw new IOException("Data transfer corrupted on " + ncfile.getLocation());

    int psize = NcStream.readVInt(is);
    if (debug) System.out.println("  readData data message len= " + psize);
    byte[] dp = new byte[psize];
    NcStream.readFully(is, dp);
    NcStreamProto.Data dproto = NcStreamProto.Data.parseFrom(dp);
    // if (debug) System.out.println(" readData proto = " + dproto);

    Structure s = (Structure) ncfile.findVariable(dproto.getVarName());
    StructureMembers members = s.makeStructureMembers();
    ArrayStructureBB.setOffsets(members);

    ByteOrder bo = NcStream.decodeDataByteOrder(dproto);
    return new StreamDataIterator(is, members, bo);
  }
public StructureDataIterator getStructureIterator(InputStream is, NetcdfFile ncfile) throws IOException {
    if (!NcStream.readAndTest(is, NcStream.MAGIC_DATA))
      throw new IOException("Data transfer corrupted on " + ncfile.getLocation());

    int psize = NcStream.readVInt(is);
    if (debug) System.out.println("  readData data message len= " + psize);
    byte[] dp = new byte[psize];
    NcStream.readFully(is, dp);
    NcStreamProto.Data dproto = NcStreamProto.Data.parseFrom(dp);
    // if (debug) System.out.println(" readData proto = " + dproto);

    Structure s = (Structure) ncfile.findVariable(dproto.getVarName());
    StructureMembers members = s.makeStructureMembers();
    ArrayStructureBB.setOffsets(members);

    ByteOrder bo = NcStream.decodeDataByteOrder(dproto);
    return new StreamDataIterator(is, members, bo);
  }
LOOK