This method blocks until input data is available, the end of the stream is detected, or an exception is thrown. This method does not close the embedded stream when the end of the file is reached.
If count is zero (0), then no bytes are read and this method returns 0; otherwise, this method attempts to read at least one byte. If no byte is available because the stream is at the end of the file, this method returns zero (0); otherwise, this method reads at least one byte and stores the value into buffer.
The first byte read is stored into element buffer[offset], the next one into buffer[offset+1], and so on. The number of bytes read is, at most, equal to count. Let k be the number of bytes actually read; these bytes will be stored in elements buffer[offset] through buffer[offset+k-1], leaving elements buffer[offset+k] through buffer[offset+count-1] unaffected.
In every case, elements buffer[0] through buffer[offset] and elements buffer[offset+count] through buffer[buffer.Length-1] are unaffected.
A long that specifies the position from which to begin reading the input stream. An array of bytes that is the buffer into which the data is read. When this method returns, the buffer contains the specified byte array with the values between offset and (offset+count-1) replaced by the bytes read from the current source. The byte offset in array buffer at which to begin writing the data read from the current input stream. The maximum number of bytes to read from the current stream.Return Value
The total number of bytes read into the buffer, or zero (0) if the end of the stream is reached. Returns zero (0) if count is zero.Assembly: FileNet.Api (in FileNet.Api.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Overridable Function ReadAt ( _ position As Long, _ buffer As Byte(), _ offset As Integer, _ count As Integer _ ) As Integer |
C# |
---|
public virtual int ReadAt( long position, byte[] buffer, int offset, int count ) |
Visual C++ |
---|
public: virtual int ReadAt( long long position, array<unsigned char>^ buffer, int offset, int count ) |
JavaScript |
---|
function readAt(position, buffer, offset, count); |
Parameters
- position
- Type: System..::.Int64
- buffer
- Type: array<
System..::.Byte
>[]()[]
- offset
- Type: System..::.Int32
- count
- Type: System..::.Int32