| DartStream Object : ReadBytes Method | 
| Visual Basic | 
|---|
| Public Function ReadBytes( _ Optional ByVal Count As Long = 0 _ ) As Variant | 
Some environments, such as JavaScript, do not support the passing of parameters by reference. Consequently, such methods as Receive cannot be used by passing in a String. You can use the DartStream Object to circumvent this limitation (see the ReadString method Remarks section for a Java sample).
This method may generate the following error code (refer to ErrorConstants for a complete list of error codes):
Private Function ReadAll(Stream1 As DartStream) As Byte 'Move the position to the beginning Stream1.Position = 0 ReadAll = Stream1.ReadBytes End Function