コード例 #1
0
ファイル: BasicFile.java プロジェクト: fdamken/io-facade
  /**
   * {@inheritDoc}
   *
   * @see de.fdamken.iofacade.File#openOutputStream()
   */
  @Override
  public OutputStream openOutputStream() throws IOException, FileNotFoundException {
    Assertion.acquire(this).exists();

    return Files.newOutputStream(this.getPath());
  }
コード例 #2
0
ファイル: BasicFile.java プロジェクト: fdamken/io-facade
  /**
   * {@inheritDoc}
   *
   * @see de.fdamken.iofacade.property.Makeable#create()
   */
  @Override
  public void create() throws IOException, FileAlreadyExistsException {
    Assertion.acquire(this).notExists();

    Files.createFile(this.getPath());
  }