C# Class TagTool.IO.StreamUtil

Afficher le fichier Open project: TheGuardians/TagTool

Méthodes publiques

Méthode Description
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.

Method Details

Align() public static méthode

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.
Résultat void

Copy() public static méthode

public static Copy ( EndianReader input, EndianWriter output ) : void
input EndianReader
output EndianWriter
Résultat void

Copy() public static méthode

public static Copy ( EndianReader input, EndianWriter output, int size ) : void
input EndianReader
output EndianWriter
size int
Résultat void

Copy() public static méthode

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.
Résultat void

Copy() public static méthode

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.
Résultat void

Fill() public static méthode

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.
Résultat void

Insert() public static méthode

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 .
Résultat void

Remove() public static méthode

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.
Résultat void