java.io.OptionalDataException.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(173)

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

OptionalDataException.<init>介绍

[英]Constructs a new OptionalDataException with its stack trace filled in.
[中]构造一个新的OptionalDataException,并填充其堆栈跟踪。

代码示例

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

checkReadPrimitiveTypes();
if (primitiveData.available() > 0) {
  OptionalDataException e = new OptionalDataException();
  e.length = primitiveData.available();
  throw e;
    case TC_ENDBLOCKDATA: // Can occur reading class annotation
      pushbackTC();
      OptionalDataException e = new OptionalDataException();
      e.eof = true;
      throw e;

代码示例来源:origin: stackoverflow.com

readObject0(false).

private Object readObject0(boolean unshared) throws IOException {
  boolean oldMode = bin.getBlockDataMode();
  if (oldMode) {
    int remain = bin.currentBlockRemaining();
    if (remain > 0) {
    throw new OptionalDataException(remain);
    } else if (defaultDataEnd) {
    /*
     * Fix for 4360508: stream is currently at the end of a field
     * value block written via default serialization; since there
     * is no terminating TC_ENDBLOCKDATA tag, simulate
     * end-of-custom-data behavior explicitly.
     */
    throw new OptionalDataException(true);
    }
    bin.setBlockDataMode(false);
  }

  byte tc;
  while ((tc = bin.peekByte()) == TC_RESET) {
    bin.readByte();
    handleReset();
  }

代码示例来源:origin: org.apidesign.bck2brwsr/emul

int remain = bin.currentBlockRemaining();
if (remain > 0) {
  throw new OptionalDataException(remain);
} else if (defaultDataEnd) {
  throw new OptionalDataException(true);
      bin.setBlockDataMode(true);
      throw new OptionalDataException(
        bin.currentBlockRemaining());
    } else {
      throw new OptionalDataException(true);
    } else {
      throw new StreamCorruptedException(

代码示例来源:origin: jtulach/bck2brwsr

int remain = bin.currentBlockRemaining();
if (remain > 0) {
  throw new OptionalDataException(remain);
} else if (defaultDataEnd) {
  throw new OptionalDataException(true);
      bin.setBlockDataMode(true);
      throw new OptionalDataException(
        bin.currentBlockRemaining());
    } else {
      throw new OptionalDataException(true);
    } else {
      throw new StreamCorruptedException(

代码示例来源:origin: ibinti/bugvm

checkReadPrimitiveTypes();
if (primitiveData.available() > 0) {
  OptionalDataException e = new OptionalDataException();
  e.length = primitiveData.available();
  throw e;
    case TC_ENDBLOCKDATA: // Can occur reading class annotation
      pushbackTC();
      OptionalDataException e = new OptionalDataException();
      e.eof = true;
      throw e;

代码示例来源:origin: MobiVM/robovm

checkReadPrimitiveTypes();
if (primitiveData.available() > 0) {
  OptionalDataException e = new OptionalDataException();
  e.length = primitiveData.available();
  throw e;
    case TC_ENDBLOCKDATA: // Can occur reading class annotation
      pushbackTC();
      OptionalDataException e = new OptionalDataException();
      e.eof = true;
      throw e;

代码示例来源:origin: com.jtransc/jtransc-rt

checkReadPrimitiveTypes();
if (primitiveData.available() > 0) {
  OptionalDataException e = new OptionalDataException();
  e.length = primitiveData.available();
  throw e;
    case TC_ENDBLOCKDATA: // Can occur reading class annotation
      pushbackTC();
      OptionalDataException e = new OptionalDataException();
      e.eof = true;
      throw e;

代码示例来源:origin: com.bugvm/bugvm-rt

checkReadPrimitiveTypes();
if (primitiveData.available() > 0) {
  OptionalDataException e = new OptionalDataException();
  e.length = primitiveData.available();
  throw e;
    case TC_ENDBLOCKDATA: // Can occur reading class annotation
      pushbackTC();
      OptionalDataException e = new OptionalDataException();
      e.eof = true;
      throw e;

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

checkReadPrimitiveTypes();
if (primitiveData.available() > 0) {
  OptionalDataException e = new OptionalDataException();
  e.length = primitiveData.available();
  throw e;
    case TC_ENDBLOCKDATA: // Can occur reading class annotation
      pushbackTC();
      OptionalDataException e = new OptionalDataException();
      e.eof = true;
      throw e;

代码示例来源:origin: com.gluonhq/robovm-rt

checkReadPrimitiveTypes();
if (primitiveData.available() > 0) {
  OptionalDataException e = new OptionalDataException();
  e.length = primitiveData.available();
  throw e;
    case TC_ENDBLOCKDATA: // Can occur reading class annotation
      pushbackTC();
      OptionalDataException e = new OptionalDataException();
      e.eof = true;
      throw e;

代码示例来源:origin: FlexoVM/flexovm

checkReadPrimitiveTypes();
if (primitiveData.available() > 0) {
  OptionalDataException e = new OptionalDataException();
  e.length = primitiveData.available();
  throw e;
    case TC_ENDBLOCKDATA: // Can occur reading class annotation
      pushbackTC();
      OptionalDataException e = new OptionalDataException();
      e.eof = true;
      throw e;

相关文章