Compartir a través de


ObjectOutputStream.UseProtocolVersion(ObjectStreamProtocol) Method

Definition

Specify stream protocol version to use when writing the stream.

[Android.Runtime.Register("useProtocolVersion", "(I)V", "GetUseProtocolVersion_IHandler")]
public virtual void UseProtocolVersion (Java.IO.ObjectStreamProtocol version);
[<Android.Runtime.Register("useProtocolVersion", "(I)V", "GetUseProtocolVersion_IHandler")>]
abstract member UseProtocolVersion : Java.IO.ObjectStreamProtocol -> unit
override this.UseProtocolVersion : Java.IO.ObjectStreamProtocol -> unit

Parameters

version
ObjectStreamProtocol

use ProtocolVersion from java.io.ObjectStreamConstants.

Attributes

Exceptions

if an invalid version is specified.

if an I/O error occurs.

Remarks

Specify stream protocol version to use when writing the stream.

This routine provides a hook to enable the current version of Serialization to write in a format that is backwards compatible to a previous version of the stream format.

Every effort will be made to avoid introducing additional backwards incompatibilities; however, sometimes there is no other alternative.

Added in 1.2.

Java documentation for java.io.ObjectOutputStream.useProtocolVersion(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also