Read block of bytes from stream and write data to buffer


public long Read(byte[] buffer, long offset, long count)


Class: xPCFileStream Class


Namespace: MathWorks.xPCTarget.FrameWork

Syntax Language: C#

public long Read(byte[] buffer, long offset, long count) reads a block of bytes from the file stream. It then writes the data to the specified buffer, buffer. buffer specifies the size in bytes and is a byte structure (8-bit unsigned integer). When this method returns, it contains the byte array with the values between offset and (offset + count - 1), replaced by the bytes read from the current source. offset is an integer. It specifies the byte offset in the array at which the method places the read bytes. count is an integer. It specifies the number of bytes to read from the stream. This method returns the total number of bytes the method reads into the buffer. If the requested number of bytes are not currently available, count is less than the number of bytes requested. If the method reaches the end of the stream, it can also be zero.

The largest single file that you can create on the target computer is 4 GB.




When problem occurs, query xPCException object Reason property.

Introduced in R2011b

Was this topic helpful?