程序包 org.bukkit.util.io

# 类 BukkitObjectOutputStream

java.lang.Object
java.io.OutputStream
java.io.ObjectOutputStream
org.bukkit.util.io.BukkitObjectOutputStream

所有已实现的接口:
  `Closeable`, `DataOutput`, `Flushable`, `ObjectOutput`, `ObjectStreamConstants`, `AutoCloseable`

public class BukkitObjectOutputStream extends ObjectOutputStream
这个类旨在用于与 `ConfigurationSerializable` API 一起使用. 它把对象转换为其内部表示,之后便可使用 `BukkitObjectInputStream` 反序列化.

直接继承实现这个类的语法可能在未来版本被取消.

原文：This class is designed to be used in conjunction with the `ConfigurationSerializable` API. It translates objects to an internal implementation for later deserialization using `BukkitObjectInputStream`. Behavior of implementations extending this class is not guaranteed across future versions.

- ## 嵌套类概要

  ## 从类继承的嵌套类/接口 java.io.ObjectOutputStream

  `ObjectOutputStream.PutField`

- ## 字段概要

  ### 从接口继承的字段 java.io.ObjectStreamConstants

  `baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, SERIAL_FILTER_PERMISSION, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING`

- ## 构造器概要

  构造器
  限定符
  构造器
  说明
  `protected`
  `BukkitObjectOutputStream()`
  构造函数提供镜像连接父类的功能.
  ``
  `BukkitObjectOutputStream(OutputStream out)`
  输出流作为参数的构造函数.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `protected Object`
  `replaceObject(Object obj)`

  ### 从类继承的方法 java.io.ObjectOutputStream

  `annotateClass, annotateProxyClass, close, defaultWriteObject, drain, enableReplaceObject, flush, putFields, reset, useProtocolVersion, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeClassDescriptor, writeDouble, writeFields, writeFloat, writeInt, writeLong, writeObject, writeObjectOverride, writeShort, writeStreamHeader, writeUnshared, writeUTF`

  ### 从类继承的方法 java.io.OutputStream

  `nullOutputStream`

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### BukkitObjectOutputStream

    protected BukkitObjectOutputStream() throws IOException, SecurityException
    构造函数提供镜像连接父类的功能.

    原文:Constructor provided to mirror super functionality.

    抛出:
      `IOException` - 创建输出流时发生 I/O 错误
      `SecurityException` - 如果安全管理器存在并且拒绝启用subclassing

  - ### BukkitObjectOutputStream

    public BukkitObjectOutputStream(OutputStream out) throws IOException
    输出流作为参数的构造函数.

    原文:Object output stream decoration constructor.

    参数:
      `out` - OutputStream对象
    抛出:
      `IOException` - 如果向输入流写入头数据时发生错误
    另请参阅:
      - `ObjectOutputStream(OutputStream)`

- ## 方法详细资料

  - ### replaceObject

    protected Object replaceObject(Object obj) throws IOException
    覆盖:
      `replaceObject` 在类中 `ObjectOutputStream`
    抛出:
      `IOException`