C# Класс TagTool.IO.StreamUtil

Показать файл Открыть проект

Открытые методы

Метод Описание
Align ( Stream stream, int align ) : void

Aligns the position of a stream to a power of two, padding the stream with zeroes.

Copy ( EndianReader input, EndianWriter output ) : void
Copy ( EndianReader input, EndianWriter output, int size ) : void
Copy ( Stream input, Stream output, int size ) : void

Copies data between two different streams.

Copy ( Stream stream, long originalPos, long targetPos, long size ) : void

Copies data between two locations in the same stream. The source and destination areas may overlap.

Fill ( Stream stream, byte b, int size ) : void

Fills a section of a stream with a repeating byte.

Insert ( Stream stream, int size, byte fill ) : void

Inserts space into a stream by copying everything back by a certain number of bytes.

Remove ( Stream stream, int size ) : void

Removes bytes from a stream, moving everything after the bytes to the current position and decreasing the stream length.

Описание методов

Align() публичный статический Метод

Aligns the position of a stream to a power of two, padding the stream with zeroes.
public static Align ( Stream stream, int align ) : void
stream Stream The stream.
align int The power of two to align to.
Результат void

Copy() публичный статический Метод

public static Copy ( EndianReader input, EndianWriter output ) : void
input EndianReader
output EndianWriter
Результат void

Copy() публичный статический Метод

public static Copy ( EndianReader input, EndianWriter output, int size ) : void
input EndianReader
output EndianWriter
size int
Результат void

Copy() публичный статический Метод

Copies data between two different streams.
public static Copy ( Stream input, Stream output, int size ) : void
input Stream The stream to read from.
output Stream The stream to copy the read data to.
size int The size of the data to copy.
Результат void

Copy() публичный статический Метод

Copies data between two locations in the same stream. The source and destination areas may overlap.
public static Copy ( Stream stream, long originalPos, long targetPos, long size ) : void
stream Stream The stream to copy data in.
originalPos long The position of the block of data to copy.
targetPos long The position to copy the block to.
size long The number of bytes to copy.
Результат void

Fill() публичный статический Метод

Fills a section of a stream with a repeating byte.
public static Fill ( Stream stream, byte b, int size ) : void
stream Stream The stream to fill a section of.
b byte The byte to fill the section with.
size int The size of the section to fill.
Результат void

Insert() публичный статический Метод

Inserts space into a stream by copying everything back by a certain number of bytes.
public static Insert ( Stream stream, int size, byte fill ) : void
stream Stream The stream to insert space into.
size int The size of the space to insert.
fill byte The byte to fill the inserted space with. See .
Результат void

Remove() публичный статический Метод

Removes bytes from a stream, moving everything after the bytes to the current position and decreasing the stream length.
The size of the data to remove must be >= 0
public static Remove ( Stream stream, int size ) : void
stream Stream The stream to remove bytes from.
size int The number of bytes to remove.
Результат void