java.io.ObjectOutputStream.writeNull()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(156)

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

ObjectOutputStream.writeNull介绍

[英]Write a special tag that indicates the value null into the receiver.
[中]在接收器中写入一个指示值为空的特殊标记。

代码示例

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

writeNull();
return -1;

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

writeNull();
return -1;

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

/**
 * Writes string without allowing it to be replaced in stream.  Used by
 * ObjectStreamClass to write class descriptor type strings.
 */
void writeTypeString(String str) throws IOException {
  int handle;
  if (str == null) {
    writeNull();
  } else if ((handle = handles.lookup(str)) != -1) {
    writeHandle(handle);
  } else {
    writeString(str, false);
  }
}

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

/**
 * Writes string without allowing it to be replaced in stream.  Used by
 * ObjectStreamClass to write class descriptor type strings.
 */
void writeTypeString(String str) throws IOException {
  int handle;
  if (str == null) {
    writeNull();
  } else if ((handle = handles.lookup(str)) != -1) {
    writeHandle(handle);
  } else {
    writeString(str, false);
  }
}

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

/**
 * Writes representation of given class descriptor to stream.
 */
private void writeClassDesc(ObjectStreamClass desc, boolean unshared)
  throws IOException
{
  int handle;
  if (desc == null) {
    writeNull();
  } else if (!unshared && (handle = handles.lookup(desc)) != -1) {
    writeHandle(handle);
  } else if (desc.isProxy()) {
    writeProxyDesc(desc, unshared);
  } else {
    writeNonProxyDesc(desc, unshared);
  }
}

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

/**
 * Writes representation of given class descriptor to stream.
 */
private void writeClassDesc(ObjectStreamClass desc, boolean unshared)
  throws IOException
{
  int handle;
  if (desc == null) {
    writeNull();
  } else if (!unshared && (handle = handles.lookup(desc)) != -1) {
    writeHandle(handle);
  } else if (desc.isProxy()) {
    writeProxyDesc(desc, unshared);
  } else {
    writeNonProxyDesc(desc, unshared);
  }
}

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

writeNull();
return -1;

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

writeNull();
return -1;

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

writeNull();
return -1;

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

writeNull();
return -1;

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

writeNull();
return -1;

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

writeNull();
return -1;

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

writeNull();
return -1;

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

writeNull();
  return;
} else if (!unshared && (h = handles.lookup(obj)) != -1) {
  subs.assign(orig, obj);
  if (obj == null) {
    writeNull();
    return;
  } else if (!unshared && (h = handles.lookup(obj)) != -1) {

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

writeNull();
  return;
} else if (!unshared && (h = handles.lookup(obj)) != -1) {
  subs.assign(orig, obj);
  if (obj == null) {
    writeNull();
    return;
  } else if (!unshared && (h = handles.lookup(obj)) != -1) {

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

writeNull();
return -1;

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

writeNull();
return -1;

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

writeNull();
return -1;

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

writeNull();
return -1;

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

writeNull();
return -1;

相关文章

ObjectOutputStream类方法