点击或拖拽改变大小

XsBufferedFileStream.Read 方法

X#
Reads a block of bytes from the stream and writes the data in a given buffer.

命名空间:  XSharp.IO
程序集:  XSharp.Core (在 XSharp.Core.dll 中) 版本:2.22 GA
语法
 VIRTUAL METHOD Read(
	bytes AS BYTE[],
	offset AS LONG,
	count AS LONG
) AS LONG
查看代码

参数

bytes
类型:Byte
offset
类型:Int32
The byte offset in array at which the read bytes will be placed.
count
类型:Int32
The maximum number of bytes to read.

返回值

类型:Int32
The total number of bytes read into the buffer. This might be less than the number of bytes requested if that number of bytes are not currently available, or zero if the end of the stream is reached.
异常
异常条件
ArgumentNullExceptionarray is .
ArgumentOutOfRangeExceptionoffset or count is negative.
NotSupportedExceptionThe stream does not support reading.
IOExceptionAn I/O error occurred.
ArgumentExceptionoffset and count describe an invalid range in array.
ObjectDisposedExceptionMethods were called after the stream was closed.
备注
This method overrides the normal behavior of the FileStream class and reads the data from an inmemory cache, when possible
参见