public static Skip ( this input, int bytes ) : int | ||
input | this | /// Input stream. /// |
bytes | int | /// Number of bytes to skip. /// |
리턴 | int |
public static int Skip(this Stream input, int bytes)
{
int read = 0;
do{
if(bytes > 4096)
{
read += input.Read(skipBuffer, 0, 4096);
bytes -= 4096;
}else{
read += input.Read(skipBuffer, 0, bytes);
bytes = 0;
}
}while(bytes != 0);
return read;
}