public void readData ( RandomAccessFile raf , String abbrev , Range gateRange , IndexIterator ii ) throws IOException { long offset = rayOffset ; offset += ( getDataOffset ( abbrev ) * 2 - 2 ) ; raf . seek ( offset ) ; byte [ ] b2 = new byte [ 2 ] ; int dataCount = getGateCount ( abbrev ) ; byte [ ] data = new byte [ dataCount * 2 ] ; raf . readFully ( data ) ; for ( int gateIdx : gateRange ) { if ( gateIdx >= dataCount ) ii . setShortNext ( uf_header2 . missing ) ; else { b2 [ 0 ] = data [ gateIdx * 2 ] ; b2 [ 1 ] = data [ gateIdx * 2 + 1 ] ; short value = getShort ( b2 , 0 ) ; ii . setShortNext ( value ) ; } } }
Read data from this ray .