public void reopen ( AccessMode accessMode ) throws IOException { if ( this . randomAccess == null ) { associatedRandomAccessFile ( ) ; } this . accessMode = accessMode ; // write start sequences ... switch ( accessMode ) { case READ : maybeRead ( ) ; // start reading from the fiorts position this . randomAccess . rewind ( ) ; break ; case WRITE : maybeWritten ( ) ; this . randomAccess . reset ( ) ; break ; case APPEND : maybeWritten ( ) ; this . randomAccess . forwardWind ( ) ; break ; default : throw new IllegalArgumentException ( "Invalid AccessMode " + accessMode ) ; } }
reopens the datalogger . It is assumed that the logger is open .