ObjectOutputStream Constructors

Definition

Overloads

ObjectOutputStream()

Provide a way for subclasses that are completely reimplementing ObjectOutputStream to not have to allocate private data just used by this implementation of ObjectOutputStream.

ObjectOutputStream(Stream)

Creates an ObjectOutputStream that writes to the specified OutputStream.

ObjectOutputStream(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

ObjectOutputStream()

Provide a way for subclasses that are completely reimplementing ObjectOutputStream to not have to allocate private data just used by this implementation of ObjectOutputStream.

[Android.Runtime.Register(".ctor", "()V", "")]
protected ObjectOutputStream ();
Attributes

Exceptions

if an error occurs when creating this stream.

Remarks

Provide a way for subclasses that are completely reimplementing ObjectOutputStream to not have to allocate private data just used by this implementation of ObjectOutputStream.

If there is a security manager installed, this method first calls the security manager's checkPermission method with a SerializablePermission("enableSubclassImplementation") permission to ensure it's ok to enable subclassing.

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

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

ObjectOutputStream(Stream)

Creates an ObjectOutputStream that writes to the specified OutputStream.

[Android.Runtime.Register(".ctor", "(Ljava/io/OutputStream;)V", "")]
public ObjectOutputStream (System.IO.Stream? out);
[<Android.Runtime.Register(".ctor", "(Ljava/io/OutputStream;)V", "")>]
new Java.IO.ObjectOutputStream : System.IO.Stream -> Java.IO.ObjectOutputStream

Parameters

out
Stream

output stream to write to

Attributes

Exceptions

if an error occurs while writing the object stream header

Remarks

Creates an ObjectOutputStream that writes to the specified OutputStream. This constructor writes the serialization stream header to the underlying stream; callers may wish to flush the stream immediately to ensure that constructors for receiving ObjectInputStreams will not block when reading the header.

If a security manager is installed, this constructor will check for the "enableSubclassImplementation" SerializablePermission when invoked directly or indirectly by the constructor of a subclass which overrides the ObjectOutputStream.putFields or ObjectOutputStream.writeUnshared methods.

Added in 1.4.

Java documentation for java.io.ObjectOutputStream.ObjectOutputStream(java.io.OutputStream).

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

ObjectOutputStream(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected ObjectOutputStream (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.IO.ObjectOutputStream : nativeint * Android.Runtime.JniHandleOwnership -> Java.IO.ObjectOutputStream

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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