Skip to content

83f133cb 41f0 0584 8a18 b0eac56d4b10

Arthur Frederico Neves edited this page Jul 19, 2016 · 3 revisions

BasePack.Read Method

Copies a sequence of bytes from the pack and advances the current readPosition by the number of bytes copied.

Namespace: NETLIB
Assembly: NETLIB (in NETLIB.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public virtual void Read(
	byte[] buffer,
	int offset,
	int count
)

VB

Public Overridable Sub Read ( 
	buffer As Byte(),
	offset As Integer,
	count As Integer
)

C++

public:
virtual void Read(
	array<unsigned char>^ buffer, 
	int offset, 
	int count
)

F#

abstract Read : 
        buffer : byte[] * 
        offset : int * 
        count : int -> unit 
override Read : 
        buffer : byte[] * 
        offset : int * 
        count : int -> unit 

Parameters

 

buffer
Type: System.Byte[]
An array of bytes. This method copies count bytes from pack to the buffer.
offset
Type: System.Int32
The zero-based byte offset in buffer at which to begin copying bytes to the pack.
count
Type: System.Int32
The number of bytes to be copied.

Exceptions

 

Exception Condition
IndexOutOfRangeException Throws when readPosition plus count is larger than the inner buffer length.
ArgumentOutOfRangeException Throws when the offset is larger or equal than the buffer length and when offset plus count is larger than the buffer size.

See Also

Reference

BasePack Class
NETLIB Namespace

Clone this wiki locally