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