C# Class NSoft.NFramework.IO.StreamTool

Stream 개체에 Value type 정보를 read/write할 수있는 Utility class
Serializable 객체를 사용하면 되겠지만, 지정된 Stream에 기록할 때 쓰는 고전적인 방법이다.
Afficher le fichier Open project: debop/NFramework Class Usage Examples

Méthodes publiques

Méthode Description
CopyStreamToStream ( this srcStream, Stream destStream ) : void

srcStream 스트림을 읽어, destStream에 쓴다.

CopyStreamToStream ( this srcStream, Stream destStream, int bufferSize ) : void

srcStream 스트림을 읽어, destStream에 쓴다.

Read ( this stream, Stream &target ) : void

지정된 stream을 읽어서 target에 저장한다.

Read ( this stream, bool &v ) : void

지정된 stream을 읽어서 값을 반환한다.

Read ( this stream, char &v ) : void

지정된 stream을 읽어서 값을 반환한다.

Read ( this stream, double &v ) : void

지정된 stream을 읽어서 값을 반환한다.

Read ( this stream, float &v ) : void

지정된 stream을 읽어서 값을 반환한다.

Read ( this stream, int &v ) : void

지정된 stream을 읽어서 값을 반환한다.

Read ( this stream, long &v ) : void

지정된 stream을 읽어서 값을 반환한다.

Read ( this stream, short &v ) : void

지정된 stream을 읽어서 값을 반환한다.

Read ( this stream, string &v ) : void

지정된 stream을 읽어서 값을 반환한다.

ReadAllBytes ( this stream ) : byte[]

stream 의 현재 위치부터 끝까지 읽어서 바이트배열로 변환합니다.

ReadBoolean ( this stream ) : bool

stream에서 값 읽어오기

ReadBytes ( this stream, int length ) : byte[]

stream에서 값 읽어오기

ReadChar ( this stream ) : Char

stream에서 값 읽어오기

ReadDouble ( this stream ) : double

stream에서 값 읽어오기

ReadFloat ( this stream ) : float

stream에서 값 읽어오기

ReadInt16 ( this stream ) : Int16

stream에서 값 읽어오기

ReadInt32 ( this stream ) : Int32

stream에서 값 읽어오기

ReadInt64 ( this stream ) : System.Int64

stream에서 값 읽어오기

ReadStream ( this stream ) : Stream

stream에서 값 읽어오기

ReadString ( this stream ) : string

stream에서 값 읽어오기

SetStreamPosition ( this stream, int position ) : Stream

Stream의 Position을 변경한다.

Write ( this stream, Stream source ) : void

원본 스트림을 대상 스트림에 쓴다.

원본 스트림의 크기를 먼저 대상 스트림에 기록하고, 내용을 쓴다. 읽어 올 때도 크기를 먼저 읽고, 그 크기 만큼 내용을 읽어온다.

Write ( this stream, bool v ) : void

스트림에 값 쓰기

Write ( this stream, char v ) : void

스트림에 값 쓰기

Write ( this stream, double v ) : void

스트림에 값 쓰기

Write ( this stream, float v ) : void

스트림에 값 쓰기

Write ( this stream, int v ) : void

스트림에 값 쓰기

Write ( this stream, long v ) : void

스트림에 값 쓰기

Write ( this stream, short v ) : void

스트림에 값 쓰기

Write ( this stream, string v ) : void

스트림에 값 쓰기

Private Methods

Méthode Description
Read ( this stream, byte v ) : void

지정된 stream을 읽어서 값을 반환한다.

Read ( this stream, uint &v ) : void
Read ( this stream, ulong &v ) : void
Read ( this stream, ushort &v ) : void
ReadUInt16 ( this stream ) : UInt16
ReadUInt32 ( this stream ) : UInt32
ReadUInt64 ( this stream ) : System.UInt64
Write ( this stream, byte v ) : void

스트림에 값 쓰기

Write ( this stream, uint v ) : void
Write ( this stream, ulong v ) : void
Write ( this stream, ushort v ) : void

Method Details

CopyStreamToStream() public static méthode

srcStream 스트림을 읽어, destStream에 쓴다.
public static CopyStreamToStream ( this srcStream, Stream destStream ) : void
srcStream this 원본 스트림
destStream Stream 대상 스트림
Résultat void

CopyStreamToStream() public static méthode

srcStream 스트림을 읽어, destStream에 쓴다.
public static CopyStreamToStream ( this srcStream, Stream destStream, int bufferSize ) : void
srcStream this 원본 스트림
destStream Stream 대상 스트림
bufferSize int 버퍼 크기
Résultat void

Read() public static méthode

지정된 stream을 읽어서 target에 저장한다.
public static Read ( this stream, Stream &target ) : void
stream this 읽을 대상 인스턴스
target Stream 읽은 값을 저장한 인스턴스
Résultat void

Read() public static méthode

지정된 stream을 읽어서 값을 반환한다.
public static Read ( this stream, bool &v ) : void
stream this 읽을 대상 인스턴스
v bool 읽은 값
Résultat void

Read() public static méthode

지정된 stream을 읽어서 값을 반환한다.
public static Read ( this stream, char &v ) : void
stream this 읽을 대상 인스턴스
v char 읽은 값
Résultat void

Read() public static méthode

지정된 stream을 읽어서 값을 반환한다.
public static Read ( this stream, double &v ) : void
stream this 읽을 대상 인스턴스
v double 읽은 값
Résultat void

Read() public static méthode

지정된 stream을 읽어서 값을 반환한다.
public static Read ( this stream, float &v ) : void
stream this 읽을 대상 인스턴스
v float 읽은 값
Résultat void

Read() public static méthode

지정된 stream을 읽어서 값을 반환한다.
public static Read ( this stream, int &v ) : void
stream this 읽을 대상 인스턴스
v int 읽은 값
Résultat void

Read() public static méthode

지정된 stream을 읽어서 값을 반환한다.
public static Read ( this stream, long &v ) : void
stream this 읽을 대상 인스턴스
v long 읽은 값
Résultat void

Read() public static méthode

지정된 stream을 읽어서 값을 반환한다.
public static Read ( this stream, short &v ) : void
stream this 읽을 대상 인스턴스
v short 읽은 값
Résultat void

Read() public static méthode

지정된 stream을 읽어서 값을 반환한다.
public static Read ( this stream, string &v ) : void
stream this 읽을 대상 인스턴스
v string 읽은 값
Résultat void

ReadAllBytes() public static méthode

stream 의 현재 위치부터 끝까지 읽어서 바이트배열로 변환합니다.
public static ReadAllBytes ( this stream ) : byte[]
stream this 읽을 스트림
Résultat byte[]

ReadBoolean() public static méthode

stream에서 값 읽어오기
public static ReadBoolean ( this stream ) : bool
stream this 대상 Stream 객체
Résultat bool

ReadBytes() public static méthode

stream에서 값 읽어오기
public static ReadBytes ( this stream, int length ) : byte[]
stream this 대상 Stream 객체
length int 읽을 길이
Résultat byte[]

ReadChar() public static méthode

stream에서 값 읽어오기
public static ReadChar ( this stream ) : Char
stream this 대상 Stream 객체
Résultat Char

ReadDouble() public static méthode

stream에서 값 읽어오기
public static ReadDouble ( this stream ) : double
stream this 대상 Stream 객체
Résultat double

ReadFloat() public static méthode

stream에서 값 읽어오기
public static ReadFloat ( this stream ) : float
stream this 대상 Stream 객체
Résultat float

ReadInt16() public static méthode

stream에서 값 읽어오기
public static ReadInt16 ( this stream ) : Int16
stream this 대상 Stream 객체
Résultat System.Int16

ReadInt32() public static méthode

stream에서 값 읽어오기
public static ReadInt32 ( this stream ) : Int32
stream this 대상 Stream 객체
Résultat System.Int32

ReadInt64() public static méthode

stream에서 값 읽어오기
public static ReadInt64 ( this stream ) : System.Int64
stream this 대상 Stream 객체
Résultat System.Int64

ReadStream() public static méthode

stream에서 값 읽어오기
public static ReadStream ( this stream ) : Stream
stream this 대상 Stream 객체
Résultat Stream

ReadString() public static méthode

stream에서 값 읽어오기
public static ReadString ( this stream ) : string
stream this 대상 Stream 객체
Résultat string

SetStreamPosition() public static méthode

Stream의 Position을 변경한다.
포지션이 스트림 객체의 크기보다 클때
public static SetStreamPosition ( this stream, int position ) : Stream
stream this 대상 스트림 객체
position int 지정된 포지션
Résultat Stream

Write() public static méthode

원본 스트림을 대상 스트림에 쓴다.
원본 스트림의 크기를 먼저 대상 스트림에 기록하고, 내용을 쓴다. 읽어 올 때도 크기를 먼저 읽고, 그 크기 만큼 내용을 읽어온다.
public static Write ( this stream, Stream source ) : void
stream this 복사 대상 스트림
source Stream 원본 스트림
Résultat void

Write() public static méthode

스트림에 값 쓰기
public static Write ( this stream, bool v ) : void
stream this 대상 Stream 객체
v bool 쓸 값
Résultat void

Write() public static méthode

스트림에 값 쓰기
public static Write ( this stream, char v ) : void
stream this 대상 Stream 객체
v char 쓸 값
Résultat void

Write() public static méthode

스트림에 값 쓰기
public static Write ( this stream, double v ) : void
stream this 대상 Stream 객체
v double 쓸 값
Résultat void

Write() public static méthode

스트림에 값 쓰기
public static Write ( this stream, float v ) : void
stream this 대상 Stream 객체
v float 쓸 값
Résultat void

Write() public static méthode

스트림에 값 쓰기
public static Write ( this stream, int v ) : void
stream this 대상 Stream 객체
v int 쓸 값
Résultat void

Write() public static méthode

스트림에 값 쓰기
public static Write ( this stream, long v ) : void
stream this 대상 Stream 객체
v long 쓸 값
Résultat void

Write() public static méthode

스트림에 값 쓰기
public static Write ( this stream, short v ) : void
stream this 대상 Stream 객체
v short 쓸 값
Résultat void

Write() public static méthode

스트림에 값 쓰기
public static Write ( this stream, string v ) : void
stream this 대상 Stream 객체
v string 쓸 값
Résultat void