ReadVar Method
Object:
|
BinaryStream |
Syntax:
|
ReadVar (long numBytes) |
Returns:
|
An array of variants |
Description:
|
From the current location in the file, this method reads numBytes from the file
and returns an array of variants. This allows you to manipulate individual bytes
within a script.
Note: | For performance purposes, it is not recommended that you read large
files into memory on a Web Server, as this may significantly tax server resources.
|
|
Example:
Set oFM = CreateObject("SoftArtisans.FileManager") Set oBS = oFM.OpenBinaryFile(
fileName ) dim a dim b Do While Not oBS.AtEndOfStream a = oBS.ReadVar(5) ' You can
go through each single element b = Chr(a(1)) loop oBS.Close Set oFM = nothing
Copyright © 2010 SoftArtisans, Inc. All rights reserved.