Share via


IDataOutput Interface

Definition

The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream.

[Android.Runtime.Register("java/io/DataOutput", "", "Java.IO.IDataOutputInvoker")]
public interface IDataOutput : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("java/io/DataOutput", "", "Java.IO.IDataOutputInvoker")>]
type IDataOutput = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream. There is also a facility for converting a String into modified UTF-8 format and writing the resulting series of bytes.

For all the methods in this interface that write bytes, it is generally true that if a byte cannot be written for any reason, an IOException is thrown.

Added in 1.0.

Java documentation for java.io.DataOutput.

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.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)

Methods

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)
Write(Byte[], Int32, Int32)

Writes len bytes from array b, in order, to the output stream.

Write(Byte[])

Writes to the output stream all the bytes in array b.

Write(Int32)

Writes to the output stream the eight low-order bits of the argument b.

WriteBoolean(Boolean)

Writes a boolean value to this output stream.

WriteByte(Int32)

Writes to the output stream the eight low- order bits of the argument v.

WriteBytes(String)

Writes a string to the output stream.

WriteChar(Int32)

Writes a char value, which is comprised of two bytes, to the output stream.

WriteChars(String)

Writes every character in the string s, to the output stream, in order, two bytes per character.

WriteDouble(Double)

Writes a double value, which is comprised of eight bytes, to the output stream.

WriteFloat(Single)

Writes a float value, which is comprised of four bytes, to the output stream.

WriteInt(Int32)

Writes an int value, which is comprised of four bytes, to the output stream.

WriteLong(Int64)

Writes a long value, which is comprised of eight bytes, to the output stream.

WriteShort(Int32)

Writes two bytes to the output stream to represent the value of the argument.

WriteUTF(String)

Writes two bytes of length information to the output stream, followed by the modified UTF-8 representation of every character in the string s.

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)
WriteAsync(IDataOutput, Byte[], Int32, Int32)
WriteAsync(IDataOutput, Byte[])
WriteAsync(IDataOutput, Int32)
WriteBooleanAsync(IDataOutput, Boolean)
WriteByteAsync(IDataOutput, Int32)
WriteBytesAsync(IDataOutput, String)
WriteCharAsync(IDataOutput, Int32)
WriteCharsAsync(IDataOutput, String)
WriteDoubleAsync(IDataOutput, Double)
WriteFloatAsync(IDataOutput, Single)
WriteIntAsync(IDataOutput, Int32)
WriteLongAsync(IDataOutput, Int64)
WriteShortAsync(IDataOutput, Int32)
WriteUTFAsync(IDataOutput, String)

Applies to