public static void CopyStream(Stream input, Stream output)
{
int bufferSize = 4096 ;
byte [] buffer = new byte [bufferSize];
while (true )
{
int read = input.Read(buffer, 0 , buffer.Length);
if (read <= 0 )
{
return ;
}
output.Write(buffer, 0 , read);
}
}
Stream复制
最新推荐文章于 2022-11-05 21:31:38 发布