nw::io::IOStream::Read Member Function

Syntax

virtual s32 Read(
     void*            buf,
     u32 length
);

Arguments

Name Description
out buf Pointer to the buffer where data to be read is stored. The alignment of this data must match the alignment obtained using the GetBufferAlign function.
in length Data size to be read. The alignment of this data must match the alignment obtained using the GetSizeAlign function.

Return Values

Returns the number of bytes actually read if successful.

Returns a negative value error code if an error occurs during reading.
For details about the error codes that are returned, refer to the description of the concrete class.

Description

Reads data from the stream (synchronous process).

Fails on ASSERT if the return value of the nw::io::IOStream::CanRead function is false.
This function blocks processing until the reading out of data has completed. You can use the asynchronous version of the function (nw::io::IOStream::ReadAsync) if the return value of the nw::io::IOStream::CanAsync function is true.

See Also

nw::io::IOStream::ReadAsync
nw::io::IOStream::CanRead
nw::io::IOStream::CanAsync
nw::io::IOStream::GetBufferAlign
nw::io::IOStream::GetSizeAlign

Revision History

2009/10/20
Initial version.

CONFIDENTIAL