public Array readData ( Variable v2 , Section section ) throws IOException , InvalidRangeException { // subset Object data ; Array outputData ; byte [ ] vdata = null ; NOWRadheader . Vinfo vinfo ; ByteBuffer bos ; List < Range > ranges = section . getRanges ( ) ; vinfo = ( NOWRadheader . Vinfo ) v2 . getSPobject ( ) ; vdata = headerParser . getData ( ( int ) vinfo . hoff ) ; bos = ByteBuffer . wrap ( vdata ) ; data = readOneScanData ( bos , vinfo , v2 . getShortName ( ) ) ; outputData = Array . factory ( v2 . getDataType ( ) , v2 . getShape ( ) , data ) ; outputData = outputData . flip ( 1 ) ; // outputData = outputData.flip(2); return ( outputData . sectionNoReduce ( ranges ) . copy ( ) ) ; // return outputData; }
Read the data for each variable passed in