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
    
    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()
    
   
  
  Assembly: Lucene.Net.dll
  
  
    public class DataInputStream : IDataInput, IDisposable
   
  Constructors
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  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. 
 | 
      
    
  
  
  
  Methods
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  
  
  Declaration
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  
  
  Declaration
  
    public int Read(byte[] buffer)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Byte[] | 
        buffer | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  
  
  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
  
  
  
  
  
  Declaration
  
    public bool ReadBoolean()
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  NOTE: This was readUnsignedByte() in Java
 
  
  Declaration
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  
  
  Declaration
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Char | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  
  
  Declaration
  
    public double ReadDouble()
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Double | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  
  
  Declaration
  
    public void ReadFully(byte[] buffer)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Byte[] | 
        buffer | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  
  
  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
  
  
  
  NOTE: This was readShort() in Java
 
  
  Declaration
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int16 | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  NOTE: This was readInt() in Java
 
  
  Declaration
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  NOTE: This was readLong() in Java
 
  
  Declaration
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int64 | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  
  
  Declaration
  
    [Obsolete]
public string ReadLine()
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  NOTE: This was readByte() in Java
 
  
  Declaration
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  NOTE: This was readFloat() in Java
 
  
  Declaration
  
    public float ReadSingle()
   
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Single | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  NOTE: This was readUnsignedShort() in Java
 
  
  Declaration
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  
  
  Declaration
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  
  
  
  Declaration
  
    public int SkipBytes(int count)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        count | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  Implements
  
  
      System.IDisposable
  
  Extension Methods