Show / Hide Table of Contents

    Class DataOutputStream

    Java's DataOutputStream is similar to .NET's BinaryWriter. However, it writes in a modified UTF-8 format that cannot be read (or duplicated) using BinaryWriter. This is a port of DataOutputStream that is fully compatible with Java's DataInputStream.

    Usage Note: Always favor BinaryWriter over DataOutputStream unless you specifically need the modified UTF-8 format and/or the WriteUTF(String) method.

    Inheritance
    System.Object
    DataOutputStream
    Implements
    IDataOutput
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Support.IO
    Assembly: Lucene.Net.dll
    Syntax
    public class DataOutputStream : IDataOutput, IDisposable

    Constructors

    | Improve this Doc View Source

    DataOutputStream(Stream)

    Constructs a new DataOutputStream on the System.IO.Stream out. Note that data written by this stream is not in a human readable form but can be reconstructed by using a DataInputStream on the resulting output.

    Declaration
    public DataOutputStream(Stream out)
    Parameters
    Type Name Description
    System.IO.Stream out

    the target stream for writing.

    See Also
    DataInputStream

    Fields

    | Improve this Doc View Source

    written

    The number of bytes written out so far.

    Declaration
    protected int written
    Field Value
    Type Description
    System.Int32

    Properties

    | Improve this Doc View Source

    Length

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    Dispose()

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Flush()

    Declaration
    public virtual void Flush()
    | Improve this Doc View Source

    Write(Byte[])

    Declaration
    public void Write(byte[] b)
    Parameters
    Type Name Description
    System.Byte[] b
    | Improve this Doc View Source

    Write(Byte[], Int32, Int32)

    Declaration
    public virtual void Write(byte[] buffer, int offset, int count)
    Parameters
    Type Name Description
    System.Byte[] buffer
    System.Int32 offset
    System.Int32 count
    | Improve this Doc View Source

    Write(Int32)

    Declaration
    public virtual void Write(int oneByte)
    Parameters
    Type Name Description
    System.Int32 oneByte
    | Improve this Doc View Source

    WriteBoolean(Boolean)

    Declaration
    public void WriteBoolean(bool val)
    Parameters
    Type Name Description
    System.Boolean val
    | Improve this Doc View Source

    WriteByte(Int32)

    Declaration
    public void WriteByte(int val)
    Parameters
    Type Name Description
    System.Int32 val
    | Improve this Doc View Source

    WriteBytes(String)

    Declaration
    public void WriteBytes(string str)
    Parameters
    Type Name Description
    System.String str
    | Improve this Doc View Source

    WriteChar(Int32)

    Declaration
    public void WriteChar(int val)
    Parameters
    Type Name Description
    System.Int32 val
    | Improve this Doc View Source

    WriteChars(String)

    Declaration
    public void WriteChars(string str)
    Parameters
    Type Name Description
    System.String str
    | Improve this Doc View Source

    WriteDouble(Double)

    Declaration
    public void WriteDouble(double val)
    Parameters
    Type Name Description
    System.Double val
    | Improve this Doc View Source

    WriteInt16(Int32)

    NOTE: This was writeShort() in Java

    Declaration
    public void WriteInt16(int val)
    Parameters
    Type Name Description
    System.Int32 val
    | Improve this Doc View Source

    WriteInt32(Int32)

    NOTE: This was writeInt() in Java

    Declaration
    public void WriteInt32(int val)
    Parameters
    Type Name Description
    System.Int32 val
    | Improve this Doc View Source

    WriteInt64(Int64)

    NOTE: This was writeLong() in Java

    Declaration
    public void WriteInt64(long val)
    Parameters
    Type Name Description
    System.Int64 val
    | Improve this Doc View Source

    WriteSingle(Single)

    NOTE: This was writeFloat() in Java

    Declaration
    public void WriteSingle(float val)
    Parameters
    Type Name Description
    System.Single val
    | Improve this Doc View Source

    WriteUTF(String)

    Declaration
    public void WriteUTF(string str)
    Parameters
    Type Name Description
    System.String str

    Implements

    IDataOutput
    System.IDisposable

    Extension Methods

    Number.IsNumber(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Licensed to the Apache Software Foundation (ASF)