org.uberfire.java.nio.IOException.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(71)

本文整理了Java中org.uberfire.java.nio.IOException.<init>()方法的一些代码示例,展示了IOException.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IOException.<init>()方法的具体详情如下:
包路径:org.uberfire.java.nio.IOException
类名称:IOException
方法名:<init>

IOException.<init>介绍

暂无

代码示例

代码示例来源:origin: org.uberfire/vfs-fs

@Override
public void close() throws IOException {
  if (isClosed) {
    throw new IOException();
  }
  isClosed = true;
}

代码示例来源:origin: org.uberfire/uberfire-nio2-fs

@Override
public void close() throws IOException {
  if (isClosed) {
    throw new IOException("This stream is closed.");
  }
  isClosed = true;
}

代码示例来源:origin: org.uberfire/uberfire-nio2-model

@Override
public SeekableByteChannel truncate(final long size) throws IOException {
  try {
    channel.truncate(size);
    return this;
  } catch (java.io.IOException e) {
    throw new IOException(e);
  }
}

代码示例来源:origin: org.uberfire/uberfire-nio2-model

@Override
  public void close() throws java.io.IOException {
    try {
      channel.close();
    } catch (java.io.IOException e) {
      throw new IOException(e);
    }
  }
}

代码示例来源:origin: org.uberfire/uberfire-nio2-model

@Override
public long position() throws IOException {
  try {
    return channel.position();
  } catch (java.io.IOException e) {
    throw new IOException(e);
  }
}

代码示例来源:origin: org.uberfire/uberfire-nio2-model

@Override
public long size() throws IOException {
  try {
    return channel.size();
  } catch (java.io.IOException e) {
    throw new IOException(e);
  }
}

代码示例来源:origin: org.uberfire/uberfire-nio2-model

@Override
public int read(final ByteBuffer dst) throws java.io.IOException {
  try {
    return channel.read(dst);
  } catch (java.io.IOException e) {
    throw new IOException(e);
  }
}

代码示例来源:origin: org.uberfire/uberfire-nio2-model

@Override
public SeekableByteChannel position(final long newPosition) throws IOException {
  try {
    channel.position(newPosition);
    return this;
  } catch (java.io.IOException e) {
    throw new IOException(e);
  }
}

代码示例来源:origin: org.uberfire/uberfire-nio2-model

@Override
public int write(final ByteBuffer src) throws java.io.IOException {
  try {
    return channel.write(src);
  } catch (java.io.IOException e) {
    throw new IOException(e);
  }
}

代码示例来源:origin: kiegroup/appformer

@Override
public long position() throws IOException {
  try {
    return channel.position();
  } catch (java.io.IOException e) {
    throw new IOException(e);
  }
}

代码示例来源:origin: kiegroup/appformer

@Override
public SeekableByteChannel position(final long newPosition) throws IOException {
  try {
    channel.position(newPosition);
    return this;
  } catch (java.io.IOException e) {
    throw new IOException(e);
  }
}

代码示例来源:origin: kiegroup/appformer

@Override
public SeekableByteChannel truncate(final long size) throws IOException {
  try {
    channel.truncate(size);
    return this;
  } catch (java.io.IOException e) {
    throw new IOException(e);
  }
}

代码示例来源:origin: org.uberfire/vfs-fs

@Override
public OutputStream newOutputStream(final Path path, final OpenOption... options)
    throws IllegalArgumentException, UnsupportedOperationException, IOException, SecurityException {
  checkNotNull("path", path);
  try {
    return new FileOutputStream(path.toFile());
  } catch (Exception e) {
    throw new IOException();
  }
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-data-modeller-client

@Test
  public void callFailsAndCommandIsCalled() throws Exception {

    doThrow(new IOException()).when(modelerService).validate(anyString(),
                                 any(Path.class),
                                 any(DataObject.class));

    final Command afterValidation = mock(Command.class);
    presenter.onValidate(afterValidation);
    verify(afterValidation).execute();
  }
}

代码示例来源:origin: org.drools/drools-wb-guided-rule-editor-client

@Test
  public void callFailsAndCommandIsCalled() throws Exception {

    doThrow(new IOException()).when(service).validate(any(Path.class),
                             any(RuleModel.class));

    final Command afterValidation = mock(Command.class);
    presenter.onValidate(afterValidation);
    verify(afterValidation).execute();
  }
}

代码示例来源:origin: kiegroup/drools-wb

@Test
  public void callFailsAndCommandIsCalled() throws Exception {

    doThrow(new IOException()).when(decisionTableXLSService).validate(any(Path.class),
                                     any(Path.class));

    final Command afterValidation = mock(Command.class);
    presenter.onValidate(afterValidation);
    verify(afterValidation).execute();
  }
}

代码示例来源:origin: kiegroup/drools-wb

@Test
  public void callFailsAndCommandIsCalled() throws Exception {

    doThrow(new IOException()).when(service).validate(any(Path.class),
                             any(GlobalsModel.class));

    final Command afterValidation = mock(Command.class);
    presenter.onValidate(afterValidation);
    verify(afterValidation).execute();
  }
}

代码示例来源:origin: kiegroup/appformer

public void execute() {
    try {
      git._branchDelete().setBranchNames(branch.getName()).setForce(true).call();
    } catch (final GitAPIException e) {
      throw new IOException(e);
    }
  }
}

代码示例来源:origin: org.uberfire/vfs-jgit

public static Git newRepository(final File repoFolder) throws IOException {
  checkNotNull("repoFolder", repoFolder);
  try {
    return Git.init().setBare(true).setDirectory(repoFolder).call();
  } catch (GitAPIException e) {
    throw new IOException(e);
  }
}

代码示例来源:origin: org.uberfire/vfs-jgit

public static void deleteBranch(final Git git, final Ref branch) {
  try {
    git.branchDelete().setBranchNames(branch.getName()).setForce(true).call();
  } catch (final GitAPIException e) {
    throw new IOException(e);
  }
}

相关文章

微信公众号

最新文章

更多