class PauseResumeAudioRecorder {

    public void setAudioFile(final String audioFilePath){
        if (audioFilePath==null || audioFilePath.trim().isEmpty()){
            throw new IllegalArgumentException("audioFile cannot be null, empty, blank, or directory");
        }
        else if (currentAudioState.get()!=PREPARED_STATE && currentAudioState.get()!=INITIALIZED_STATE ){
            throw new IllegalStateException("Recorder cannot have its file changed when it is not in an initialized or prepared state");
        }
        String modifiedAudioFilePath=audioFilePath;
        if (modifiedAudioFilePath.toLowerCase(Locale.getDefault()).contains(".")){
            final String subString=modifiedAudioFilePath.substring(modifiedAudioFilePath.lastIndexOf("."));
            modifiedAudioFilePath=modifiedAudioFilePath.replace(subString,".temp");
        }
        else {
            modifiedAudioFilePath=modifiedAudioFilePath+".temp";
        }
        this.audioFile=modifiedAudioFilePath;
        currentAudioState.getAndSet(PREPARED_STATE);
    }

    public  PauseResumeAudioRecorder();

}