C# Class Kirikiri.Tjs2.BinaryStream

バイナリストリーム读み书きクラス
ファイルを表示 Open project: fantasydr/krkr-cs Class Usage Examples

Public Methods

Method Description
Close ( ) : void

close stream

GetFileOffset ( ) : long
GetFilePath ( ) : string
GetInputStream ( ) : InputStream
GetOutputStream ( ) : OutputStream
GetPosition ( ) : long
GetSize ( ) : long

should re-implement for higher performance

IsArchive ( ) : bool

アーカイブ内のファイルかどうか判定する

Read ( ByteBuffer buffer ) : int

returns actually read size

Read ( byte buffer ) : int

returns actually read size

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

ストリームからの读み迂み

ReadBuffer ( ByteBuffer buffer ) : void
Seek ( long offset, int whence ) : long

シークする エラー时、位置は变更されない

SetEndOfStorage ( ) : void

the default behavior is raising a exception if error, raises exception

SetPosition ( long pos ) : void
Write ( ByteBuffer buffer ) : int

returns actually written size

Write ( byte buffer ) : int

returns actually written size

Write ( byte b, int off, int len ) : void
Write ( int b ) : void

1 バイトが出力ストリームに书き迂まれます。 书き迂まれるバイトは、引数 b の下位 8 ビットです。 b の上位 24 ビットは无视されます。

WriteBuffer ( ByteBuffer buffer ) : void

Method Details

Close() public abstract method

close stream
public abstract Close ( ) : void
return void

GetFileOffset() public method

public GetFileOffset ( ) : long
return long

GetFilePath() public abstract method

public abstract GetFilePath ( ) : string
return string

GetInputStream() public abstract method

public abstract GetInputStream ( ) : InputStream
return Sharpen.InputStream

GetOutputStream() public abstract method

public abstract GetOutputStream ( ) : OutputStream
return Sharpen.OutputStream

GetPosition() public method

public GetPosition ( ) : long
return long

GetSize() public method

should re-implement for higher performance
TJSException
public GetSize ( ) : long
return long

IsArchive() public method

アーカイブ内のファイルかどうか判定する
public IsArchive ( ) : bool
return bool

Read() public abstract method

returns actually read size
TJSException
public abstract Read ( ByteBuffer buffer ) : int
buffer Sharpen.ByteBuffer
return int

Read() public abstract method

returns actually read size
TJSException
public abstract Read ( byte buffer ) : int
buffer byte
return int

Read() public abstract method

ストリームからの读み迂み
TJSException
public abstract Read ( byte b, int off, int len ) : int
b byte 读み迂み先byte配列
off int 配列オフセット
len int 读み迂みサイズ
return int

ReadBuffer() public method

public ReadBuffer ( ByteBuffer buffer ) : void
buffer Sharpen.ByteBuffer
return void

Seek() public abstract method

シークする エラー时、位置は变更されない
TJSException
public abstract Seek ( long offset, int whence ) : long
offset long 基准位置からのオフセット
whence int 基准位置、SEEK_SET, SEEK_CUR, SEEK_END のいずれかを指定
return long

SetEndOfStorage() public method

the default behavior is raising a exception if error, raises exception
public SetEndOfStorage ( ) : void
return void

SetPosition() public method

public SetPosition ( long pos ) : void
pos long
return void

Write() public abstract method

returns actually written size
public abstract Write ( ByteBuffer buffer ) : int
buffer Sharpen.ByteBuffer
return int

Write() public abstract method

returns actually written size
public abstract Write ( byte buffer ) : int
buffer byte
return int

Write() public abstract method

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

Write() public abstract method

1 バイトが出力ストリームに书き迂まれます。 书き迂まれるバイトは、引数 b の下位 8 ビットです。 b の上位 24 ビットは无视されます。
public abstract Write ( int b ) : void
b int
return void

WriteBuffer() public method

public WriteBuffer ( ByteBuffer buffer ) : void
buffer Sharpen.ByteBuffer
return void