Show / Hide Table of Contents

    Class DataInputStream

    Java's DataInputStream is similar to .NET's BinaryReader. However, it reads using a modified UTF-8 format that cannot be read using BinaryReader. This is a port of DataInputStream that is fully compatible with Java's DataOutputStream.

    Usage Note: Always favor BinaryReader over DataInputStream unless you specifically need the modified UTF-8 format and/or the ReadUTF() or Lucene.Net.Support.IO.DataInputStream.DecodeUTF(System.Int32) method.

    Inheritance
    System.Object
    DataInputStream
    Implements
    IDataInput
    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 DataInputStream : IDataInput, IDisposable

    Constructors

    | Improve this Doc View Source

    DataInputStream(Stream)

    Constructs a new DataInputStream on the System.IO.Stream in. All reads are then filtered through this stream. Note that data read by this stream is not in a human readable format and was most likely created by a DataOutputStream.

    Declaration
    public DataInputStream(Stream in)
    Parameters
    Type Name Description
    System.IO.Stream in

    the source System.IO.Stream the filter reads from.

    See Also
    DataOutputStream

    Methods

    | Improve this Doc View Source

    Dispose()

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

    Read(Byte[])

    Declaration
    public int Read(byte[] buffer)
    Parameters
    Type Name Description
    System.Byte[] buffer
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    Read(Byte[], Int32, Int32)

    Declaration
    public int Read(byte[] buffer, int offset, int length)
    Parameters
    Type Name Description
    System.Byte[] buffer
    System.Int32 offset
    System.Int32 length
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    ReadBoolean()

    Declaration
    public bool ReadBoolean()
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    ReadByte()

    NOTE: This was readUnsignedByte() in Java

    Declaration
    public int ReadByte()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    ReadChar()

    Declaration
    public char ReadChar()
    Returns
    Type Description
    System.Char
    | Improve this Doc View Source

    ReadDouble()

    Declaration
    public double ReadDouble()
    Returns
    Type Description
    System.Double
    | Improve this Doc View Source

    ReadFully(Byte[])

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

    ReadFully(Byte[], Int32, Int32)

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

    ReadInt16()

    NOTE: This was readShort() in Java

    Declaration
    public short ReadInt16()
    Returns
    Type Description
    System.Int16
    | Improve this Doc View Source

    ReadInt32()

    NOTE: This was readInt() in Java

    Declaration
    public int ReadInt32()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    ReadInt64()

    NOTE: This was readLong() in Java

    Declaration
    public long ReadInt64()
    Returns
    Type Description
    System.Int64
    | Improve this Doc View Source

    ReadLine()

    Declaration
    [Obsolete]
    public string ReadLine()
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    ReadSByte()

    NOTE: This was readByte() in Java

    Declaration
    public int ReadSByte()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    ReadSingle()

    NOTE: This was readFloat() in Java

    Declaration
    public float ReadSingle()
    Returns
    Type Description
    System.Single
    | Improve this Doc View Source

    ReadUInt16()

    NOTE: This was readUnsignedShort() in Java

    Declaration
    public int ReadUInt16()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    ReadUTF()

    Declaration
    public string ReadUTF()
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    SkipBytes(Int32)

    Declaration
    public int SkipBytes(int count)
    Parameters
    Type Name Description
    System.Int32 count
    Returns
    Type Description
    System.Int32

    Implements

    IDataInput
    System.IDisposable

    Extension Methods

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