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

Inheritance: IDataOutput, IDisposable
显示文件 Open project: apache/lucenenet Class Usage Examples

Protected Properties

Property Type Description
written int

Public Methods

Method Description
DataOutputStream ( Stream @out ) : System

Creates a new data output stream to write data to the specified underlying output stream. The counter written is set to zero.

Dispose ( ) : void
Flush ( ) : void
Write ( byte b ) : void
WriteBoolean ( bool v ) : void
WriteByte ( int v ) : void
WriteBytes ( string s ) : void
WriteChar ( int v ) : void
WriteChars ( string s ) : void
WriteDouble ( double v ) : void
WriteFloat ( float v ) : void
WriteInt ( int v ) : void
WriteLong ( long v ) : void
WriteShort ( int v ) : void
WriteUTF ( string str ) : void

Private Methods

Method Description
IncCount ( int value ) : void

Increases the written counter by the specified value until it reaches int.MaxValue.

Write ( byte b, int off, int len ) : void
Write ( int b ) : void
WriteUTF ( string str, IDataOutput @out ) : int

Method Details

DataOutputStream() public method

Creates a new data output stream to write data to the specified underlying output stream. The counter written is set to zero.
public DataOutputStream ( Stream @out ) : System
@out Stream
return System

Dispose() public method

public Dispose ( ) : void
return void

Flush() public method

public Flush ( ) : void
return void

Write() public method

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

WriteBoolean() public method

public WriteBoolean ( bool v ) : void
v bool
return void

WriteByte() public method

public WriteByte ( int v ) : void
v int
return void

WriteBytes() public method

public WriteBytes ( string s ) : void
s string
return void

WriteChar() public method

public WriteChar ( int v ) : void
v int
return void

WriteChars() public method

public WriteChars ( string s ) : void
s string
return void

WriteDouble() public method

public WriteDouble ( double v ) : void
v double
return void

WriteFloat() public method

public WriteFloat ( float v ) : void
v float
return void

WriteInt() public method

public WriteInt ( int v ) : void
v int
return void

WriteLong() public method

public WriteLong ( long v ) : void
v long
return void

WriteShort() public method

public WriteShort ( int v ) : void
v int
return void

WriteUTF() public method

public WriteUTF ( string str ) : void
str string
return void

Property Details

written protected_oe property

The number of bytes written to the data output stream so far. If this counter overflows, it will be wrapped to int.MaxValue.
protected int written
return int