Package ucar.ma2

Class StructureDataDeep


  • public class StructureDataDeep
    extends StructureDataA
    Make a deep copy of an existing StructureData, so that all the data is contained in this object
    Since:
    6/19/2014
    • Method Detail

      • copy

        public static StructureDataDeep copy​(StructureData sdata,
                                             StructureMembers members)
        Make deep copy from sdata to another StructureData object whose data is self contained
        Parameters:
        sdata - original sdata
        members - the StructureData members. a reference is kept to this object
        Returns:
        StructureData with all data self contained
      • copyToArrayBB

        public static ArrayStructureBB copyToArrayBB​(ArrayStructure as,
                                                     ByteOrder bo,
                                                     boolean canonical)
                                              throws IOException
        Make deep copy from an ArrayStructure to a ArrayStructureBB whose data is contained in a ByteBuffer
        Parameters:
        as - original ArrayStructure
        bo - what byte order to use ? (null for any)
        canonical - packing must be canonical
        Returns:
        ArrayStructureBB with all data self contained
        Throws:
        IOException
      • copyToArrayBB

        public static ArrayStructureBB copyToArrayBB​(Structure s,
                                                     ArrayStructure as,
                                                     ByteOrder bo)
                                              throws IOException
        Make deep copy to an ArrayStructureBB whose data is contained in a ByteBuffer. Use the order of the members in the given Structure; skip copying any not in the Structure
        Parameters:
        s - list of structure members come from here; must be compatible with ArrayStructure's data
        as - original ArrayStructure
        bo - what byte order to use ? (null for default)
        Returns:
        ArrayStructureBB with all data self contained
        Throws:
        IOException
      • copyToArrayBB

        public static ArrayStructureBB copyToArrayBB​(StructureData sdata)
        Make deep copy from a StructureData to a ArrayStructureBB whose data is contained in a ByteBuffer.
        Parameters:
        sdata - original ArrayStructure.
        Returns:
        ArrayStructureBB with all data self contained
      • copyToArrayBB

        public static ArrayStructureBB copyToArrayBB​(StructureData sdata,
                                                     StructureMembers sm,
                                                     ByteOrder bo)
        Make deep copy from a StructureData to a ArrayStructureBB whose data is contained in a ByteBuffer
        Parameters:
        sdata - original ArrayStructure
        sm - the StructureData members. a reference is kept to this object
        bo - Byte Order of the ByteBuffer
        Returns:
        ArrayStructureBB with all data self contained
      • copyToArrayBB

        public static int copyToArrayBB​(StructureData sdata,
                                        ArrayStructureBB abb)
        Make deep copy from a StructureData into the given ArrayStructureBB
        Parameters:
        sdata - original data from here
        abb - copy data into this ArrayStructureBB, starting from wherever the ByteBuffer current position is
        Returns:
        number of bytes copied