java.io.EOFException.addSuppressed()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(150)

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

EOFException.addSuppressed介绍

暂无

代码示例

代码示例来源:origin: apache/nifi

final EOFException eof = new EOFException("Failed to recover data from Write-Ahead Log Partition because encountered trailing NUL bytes. "
    + "This will sometimes happen after a sudden power loss. The rest of this journal file will be skipped for recovery purposes.");
  eof.addSuppressed(e);
  throw eof;
} else {

代码示例来源:origin: apache/nifi

} catch (final EOFException eof) {
  final EOFException exception = new EOFException("Failed to read field '" + field.getFieldName() + "'");
  exception.addSuppressed(eof);
  throw exception;
} catch (final IOException ioe) {

代码示例来源:origin: wildfly/wildfly

sourceConduit.terminateReads();
} catch (IOException e) {
  exception.addSuppressed(e);

代码示例来源:origin: dCache/dcache

@Override
  public void call(ByteBuffer buffer) throws SSLException
  {
    // read csr
    ByteSource chunk = ByteSource.wrap(buffer.array()).slice(buffer.arrayOffset(), buffer.position());
    ByteSource source = (data == null) ? chunk : ByteSource.concat(data, chunk);
    try {
      PKCS10CertificationRequest csr = new PKCS10CertificationRequest(source.read());
      // generate proxy
      ProxyRequestOptions options = new ProxyRequestOptions(credential.getCertificateChain(), csr);
      options.setLimited(isDelegationLimited);
      X509Certificate[] chain = ProxyGenerator.generate(options, credential.getKey());
      // send to server
      send(ByteBuffer.wrap(chain[0].getEncoded()));
    } catch (EOFException f) {
      try {
        /* Incomplete - read another frame. */
        ByteSource copy = ByteSource.wrap(chunk.read());
        data = (data == null) ? copy : ByteSource.concat(data, copy);
        receive(this);
      } catch (IOException e) {
        f.addSuppressed(e);
      }
    } catch (CertificateParsingException | NoSuchAlgorithmException | NoSuchProviderException | SignatureException | CertificateEncodingException | InvalidKeyException | IOException e) {
      throw new SSLException("GSI delegation failed: " + e.toString(), e);
    }
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

sourceConduit.terminateReads();
} catch (IOException e) {
  exception.addSuppressed(e);

相关文章