equal
deleted
inserted
replaced
364 } |
364 } |
365 } |
365 } |
366 |
366 |
367 public void setDestination(WriteableUserPath userSuppliedPath) throws IOException { |
367 public void setDestination(WriteableUserPath userSuppliedPath) throws IOException { |
368 synchronized (recorder) { |
368 synchronized (recorder) { |
|
369 checkSetDestination(userSuppliedPath); |
|
370 this.destination = userSuppliedPath; |
|
371 } |
|
372 } |
|
373 |
|
374 public void checkSetDestination(WriteableUserPath userSuppliedPath) throws IOException { |
|
375 synchronized (recorder) { |
369 if (Utils.isState(getState(), RecordingState.STOPPED, RecordingState.CLOSED)) { |
376 if (Utils.isState(getState(), RecordingState.STOPPED, RecordingState.CLOSED)) { |
370 throw new IllegalStateException("Destination can't be set on a recording that has been stopped/closed"); |
377 throw new IllegalStateException("Destination can't be set on a recording that has been stopped/closed"); |
371 } |
378 } |
372 this.destination = userSuppliedPath; |
|
373 } |
379 } |
374 } |
380 } |
375 |
381 |
376 public WriteableUserPath getDestination() { |
382 public WriteableUserPath getDestination() { |
377 synchronized (recorder) { |
383 synchronized (recorder) { |