java.io.ObjectInputStream.enableResolveObject()方法的使用及代码示例

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

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

ObjectInputStream.enableResolveObject介绍

[英]Enables object replacement for this stream. By default this is not enabled. Only trusted subclasses (loaded with system class loader) are allowed to change this status.
[中]启用此流的对象替换。默认情况下,此选项未启用。仅允许受信任的子类(使用系统类加载器加载)更改此状态。

代码示例

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

/**
 * Constructor provided to mirror super functionality.
 *
 * @throws IOException
 * @throws SecurityException
 * @see ObjectInputStream#ObjectInputStream()
 */
protected BukkitObjectInputStream() throws IOException, SecurityException {
  super();
  super.enableResolveObject(true);
}

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

/**
 * Object input stream decoration constructor.
 *
 * @param in
 * @throws IOException
 * @see ObjectInputStream#ObjectInputStream(InputStream)
 */
public BukkitObjectInputStream(InputStream in) throws IOException {
  super(in);
  super.enableResolveObject(true);
}

代码示例来源:origin: kelemen/netbeans-gradle-project

@Override
protected final boolean enableResolveObject(boolean enable) throws SecurityException {
  // This method was declared to disable the warning: virtual method is called from the constructor.
  return super.enableResolveObject(enable);
}

代码示例来源:origin: SpigotMC/Spigot-API

/**
 * Constructor provided to mirror super functionality.
 *
 * @throws IOException
 * @throws SecurityException
 * @see ObjectInputStream#ObjectInputStream()
 */
protected BukkitObjectInputStream() throws IOException, SecurityException {
  super();
  super.enableResolveObject(true);
}

代码示例来源:origin: SpigotMC/Spigot-API

/**
 * Object input stream decoration constructor.
 *
 * @param in
 * @throws IOException
 * @see ObjectInputStream#ObjectInputStream(InputStream)
 */
public BukkitObjectInputStream(InputStream in) throws IOException {
  super(in);
  super.enableResolveObject(true);
}

相关文章

ObjectInputStream类方法