C# Class Lucene.Net.Support.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(IDataInput) method.

Inheritance: IDataInput, IDisposable
Show file Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
DataInputStream ( Stream @in ) : System

Creates a DataInputStream that uses the specified underlying InputStream.

Dispose ( ) : void
Read ( byte b ) : int
Read ( byte b, int off, int len ) : int
ReadBoolean ( ) : bool
ReadByte ( ) : byte
ReadChar ( ) : char
ReadDouble ( ) : double
ReadFloat ( ) : float
ReadFully ( byte b ) : void
ReadFully ( byte b, int off, int len ) : void
ReadInt ( ) : int
ReadLong ( ) : long
ReadShort ( ) : short
ReadUTF ( ) : string
ReadUTF ( IDataInput @in ) : string
ReadUnsignedByte ( ) : int
ReadUnsignedShort ( ) : int
SkipBytes ( int n ) : int

Private Methods

Method Description
ReadLine ( ) : string
Skip ( Stream stream, int n ) : int

Helper method for SkipBytes, since Position and Seek do not work on non-seekable streams.

Method Details

DataInputStream() public method

Creates a DataInputStream that uses the specified underlying InputStream.
public DataInputStream ( Stream @in ) : System
@in Stream
return System

Dispose() public method

public Dispose ( ) : void
return void

Read() public method

public Read ( byte b ) : int
b byte
return int

Read() public method

public Read ( byte b, int off, int len ) : int
b byte
off int
len int
return int

ReadBoolean() public method

public ReadBoolean ( ) : bool
return bool

ReadByte() public method

public ReadByte ( ) : byte
return byte

ReadChar() public method

public ReadChar ( ) : char
return char

ReadDouble() public method

public ReadDouble ( ) : double
return double

ReadFloat() public method

public ReadFloat ( ) : float
return float

ReadFully() public method

public ReadFully ( byte b ) : void
b byte
return void

ReadFully() public method

public ReadFully ( byte b, int off, int len ) : void
b byte
off int
len int
return void

ReadInt() public method

public ReadInt ( ) : int
return int

ReadLong() public method

public ReadLong ( ) : long
return long

ReadShort() public method

public ReadShort ( ) : short
return short

ReadUTF() public method

public ReadUTF ( ) : string
return string

ReadUTF() public static method

public static ReadUTF ( IDataInput @in ) : string
@in IDataInput
return string

ReadUnsignedByte() public method

public ReadUnsignedByte ( ) : int
return int

ReadUnsignedShort() public method

public ReadUnsignedShort ( ) : int
return int

SkipBytes() public method

public SkipBytes ( int n ) : int
n int
return int