static public ArrayStructureBB copyToArrayBB ( StructureData sdata , StructureMembers sm , ByteOrder bo ) { int size = sm . getStructureSize ( ) ; ByteBuffer bb = ByteBuffer . allocate ( size ) ; // default is big endian bb . order ( bo ) ; ArrayStructureBB abb = new ArrayStructureBB ( sm , new int [ ] { 1 } , bb , 0 ) ; ArrayStructureBB . setOffsets ( sm ) ; copyToArrayBB ( sdata , abb ) ; return abb ; }
Make deep copy from a StructureData to a ArrayStructureBB whose data is contained in a ByteBuffer