C# 클래스 ServiceStack.StreamExtensions

파일 보기 프로젝트 열기: ServiceStack/ServiceStack.Text

공개 메소드들

메소드 설명
Close ( this stream ) : void
CollapseWhitespace ( this str ) : string
Combine ( this bytes ) : byte[]
CopyTo ( this input, Stream output ) : long

Copies all the data from one stream into another.

CopyTo ( this input, Stream output, byte buffer ) : long

Copies all the data from one stream into another, using the given buffer for transferring data. Note that the current contents of the buffer is ignored, so the buffer needn't be cleared beforehand.

CopyTo ( this input, Stream output, int bufferSize ) : long

Copies all the data from one stream into another, using a buffer of the given size.

ReadExactly ( this input, byte buffer ) : byte[]

Reads into a buffer, filling it completely.

ReadExactly ( this input, byte buffer, int bytesToRead ) : byte[]

Reads exactly the given number of bytes from the specified stream, into the given buffer, starting at position 0 of the array.

ReadExactly ( this input, byte buffer, int startIndex, int bytesToRead ) : byte[]

Reads exactly the given number of bytes from the specified stream, into the given buffer, starting at position 0 of the array.

ReadExactly ( this input, int bytesToRead ) : byte[]

Reads exactly the given number of bytes from the specified stream. If the end of the stream is reached before the specified amount of data is read, an exception is thrown.

ReadFully ( this input ) : byte[]

Reads the given stream up to the end, returning the data as a byte array.

ReadFully ( this input, byte buffer ) : byte[]

Reads the given stream up to the end, returning the data as a byte array, using the given buffer for transferring data. Note that the current contents of the buffer is ignored, so the buffer needn't be cleared beforehand.

ReadFully ( this input, int bufferSize ) : byte[]

Reads the given stream up to the end, returning the data as a byte array, using the given buffer size.

ReadLines ( this stream ) : IEnumerable
WriteTo ( this inStream, Stream outStream ) : long

비공개 메소드들

메소드 설명
ReadExactlyFast ( Stream fromStream, byte intoBuffer, int startAtIndex, int bytesToRead ) : byte[]

Same as ReadExactly, but without the argument checks.

메소드 상세

Close() 공개 정적인 메소드

public static Close ( this stream ) : void
stream this
리턴 void

CollapseWhitespace() 공개 정적인 메소드

public static CollapseWhitespace ( this str ) : string
str this
리턴 string

Combine() 공개 정적인 메소드

public static Combine ( this bytes ) : byte[]
bytes this
리턴 byte[]

CopyTo() 공개 정적인 메소드

Copies all the data from one stream into another.
public static CopyTo ( this input, Stream output ) : long
input this
output Stream
리턴 long

CopyTo() 공개 정적인 메소드

Copies all the data from one stream into another, using the given buffer for transferring data. Note that the current contents of the buffer is ignored, so the buffer needn't be cleared beforehand.
public static CopyTo ( this input, Stream output, byte buffer ) : long
input this
output Stream
buffer byte
리턴 long

CopyTo() 공개 정적인 메소드

Copies all the data from one stream into another, using a buffer of the given size.
public static CopyTo ( this input, Stream output, int bufferSize ) : long
input this
output Stream
bufferSize int
리턴 long

ReadExactly() 공개 정적인 메소드

Reads into a buffer, filling it completely.
public static ReadExactly ( this input, byte buffer ) : byte[]
input this
buffer byte
리턴 byte[]

ReadExactly() 공개 정적인 메소드

Reads exactly the given number of bytes from the specified stream, into the given buffer, starting at position 0 of the array.
public static ReadExactly ( this input, byte buffer, int bytesToRead ) : byte[]
input this
buffer byte
bytesToRead int
리턴 byte[]

ReadExactly() 공개 정적인 메소드

Reads exactly the given number of bytes from the specified stream, into the given buffer, starting at position 0 of the array.
public static ReadExactly ( this input, byte buffer, int startIndex, int bytesToRead ) : byte[]
input this
buffer byte
startIndex int
bytesToRead int
리턴 byte[]

ReadExactly() 공개 정적인 메소드

Reads exactly the given number of bytes from the specified stream. If the end of the stream is reached before the specified amount of data is read, an exception is thrown.
public static ReadExactly ( this input, int bytesToRead ) : byte[]
input this
bytesToRead int
리턴 byte[]

ReadFully() 공개 정적인 메소드

Reads the given stream up to the end, returning the data as a byte array.
public static ReadFully ( this input ) : byte[]
input this
리턴 byte[]

ReadFully() 공개 정적인 메소드

Reads the given stream up to the end, returning the data as a byte array, using the given buffer for transferring data. Note that the current contents of the buffer is ignored, so the buffer needn't be cleared beforehand.
public static ReadFully ( this input, byte buffer ) : byte[]
input this
buffer byte
리턴 byte[]

ReadFully() 공개 정적인 메소드

Reads the given stream up to the end, returning the data as a byte array, using the given buffer size.
public static ReadFully ( this input, int bufferSize ) : byte[]
input this
bufferSize int
리턴 byte[]

ReadLines() 공개 정적인 메소드

public static ReadLines ( this stream ) : IEnumerable
stream this
리턴 IEnumerable

WriteTo() 공개 정적인 메소드

public static WriteTo ( this inStream, Stream outStream ) : long
inStream this
outStream Stream
리턴 long