public void load ( MemoryShortArray shortArray ) throws IOException { if ( ! _file . exists ( ) || _file . length ( ) == 0 ) { return ; } Chronos c = new Chronos ( ) ; DataReader r = IOFactory . createDataReader ( _file , _type ) ; try { r . open ( ) ; r . position ( DATA_START_POSITION ) ; for ( int i = 0 ; i < _arrayLength ; i ++ ) { shortArray . set ( i , r . readShort ( ) ) ; } _log . info ( _file . getName ( ) + " loaded in " + c . getElapsedTime ( ) ) ; } finally { r . close ( ) ; } }
Loads this ArrayFile into a memory - based short array .