接口 Serializer<T>

    • 方法详细资料

      • serialize

        void serialize​(T object,
                       OutputStream outputStream)
                throws IOException
        Write an object of type T to the given OutputStream.

        Note: Implementations should not close the given OutputStream (or any decorators of that OutputStream) but rather leave this up to the caller.

        参数:
        object - the object to serialize
        outputStream - the output stream
        抛出:
        IOException - in case of errors writing to the stream