public void forceCloseAndDelete ( ) { try { if ( objectOutputStream != null ) { objectOutputStream . close ( ) ; objectOutputStream = null ; } if ( fileOutputStream != null ) { fileOutputStream . close ( ) ; fileOutputStream = null ; } } catch ( IOException e ) { log . debug ( e ) ; } closed = true ; tokenNumber = 0 ; if ( file != null ) { if ( file . exists ( ) && file . canWrite ( ) && ! file . delete ( ) ) { log . debug ( "couldn't delete " + file . getName ( ) ) ; } file = null ; } }
Force close and delete .