Package ucar.ma2
Class StructureDataDeep
- java.lang.Object
-
- ucar.ma2.StructureData
-
- ucar.ma2.StructureDataA
-
- ucar.ma2.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
-
-
Field Summary
-
Fields inherited from class ucar.ma2.StructureDataA
recno, sa
-
Fields inherited from class ucar.ma2.StructureData
EMPTY, members
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StructureDataDeep
copy(StructureData sdata, StructureMembers members)
Make deep copy from sdata to another StructureData object whose data is self containedstatic ArrayStructureBB
copyToArrayBB(ArrayStructure as, ByteOrder bo, boolean canonical)
Make deep copy from an ArrayStructure to a ArrayStructureBB whose data is contained in a ByteBufferstatic ArrayStructureBB
copyToArrayBB(StructureData sdata)
Make deep copy from a StructureData to a ArrayStructureBB whose data is contained in a ByteBuffer.static int
copyToArrayBB(StructureData sdata, ArrayStructureBB abb)
Make deep copy from a StructureData into the given ArrayStructureBBstatic ArrayStructureBB
copyToArrayBB(StructureData sdata, StructureMembers sm, ByteOrder bo)
Make deep copy from a StructureData to a ArrayStructureBB whose data is contained in a ByteBufferstatic ArrayStructureBB
copyToArrayBB(Structure s, ArrayStructure as, ByteOrder bo)
Make deep copy to an ArrayStructureBB whose data is contained in a ByteBuffer.-
Methods inherited from class ucar.ma2.StructureDataA
convertScalarDouble, convertScalarFloat, convertScalarInt, convertScalarLong, getArray, getArraySequence, getArrayStructure, getJavaArrayByte, getJavaArrayChar, getJavaArrayDouble, getJavaArrayFloat, getJavaArrayInt, getJavaArrayLong, getJavaArrayShort, getJavaArrayString, getScalarByte, getScalarChar, getScalarDouble, getScalarFloat, getScalarInt, getScalarLong, getScalarShort, getScalarString, getScalarStructure, showInternal
-
Methods inherited from class ucar.ma2.StructureData
convertScalarDouble, convertScalarFloat, convertScalarInt, convertScalarLong, findMember, getArray, getArraySequence, getArrayStructure, getJavaArrayByte, getJavaArrayChar, getJavaArrayDouble, getJavaArrayFloat, getJavaArrayInt, getJavaArrayLong, getJavaArrayShort, getJavaArrayString, getMembers, getName, getScalarByte, getScalarChar, getScalarDouble, getScalarFloat, getScalarInt, getScalarLong, getScalarObject, getScalarObject, getScalarShort, getScalarString, getScalarStructure, getStructureMembers, showInternalMembers, toString
-
-
-
-
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 sdatamembers
- 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 ArrayStructurebo
- 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 dataas
- original ArrayStructurebo
- 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 ArrayStructuresm
- the StructureData members. a reference is kept to this objectbo
- 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 hereabb
- copy data into this ArrayStructureBB, starting from wherever the ByteBuffer current position is- Returns:
- number of bytes copied
-
-