Storages & Files SFBinaryData object
See also object creation information - ClassID/ProgID

SFBinaryData class is a successor of the BinaryData class in ZmeY soft Utility ActiveX Objects library. It supports the same features except ReadFromFile and WriteToResponse methods which do not conform to the newObjects Pack1 standards. The functionality of these methods can be achieved through SFStream object and setting/getting the Value property and WriteToResponse is a matter of Response.BinaryWrite o.Value and such a method is not actually needed for anything.

SFBinaryData implements new members which allow the programmer to do a lot more with binary data in memory. Now it has methods that are able to write/read strictly typed values in arbitrary positions in the binary block in memory. Also string values can be read/write both ANSI and UNICODE. Both features also support control over the byte ordering - you can configure object to use little endian or big endian format for numeric values and UNICODE strings. These features together with the record based access (see SFRecord, SFField, SFFilter) and direct access to binary streams (SFStream) allows the scripting applications to manipulate virtually any available data or file format directly on low or higher level. Using these objects the developers are enabled to do entirely in script format conversions, dig for data in files/data streams of any origin, build script routines, libraries, components to provide access to certain file formats from ASP pages and other applications. 

What can you do this way? For example design a script that reads MP3 file information, or digs information from an executable file, extract useful data from image files and so on. Of course, this is not easy - you need to read the corresponding format specification and do all the dirty work, but you can do all this in your script (ASP page, NSBasic application etc.) without need to build helper components in another language.

Byte Access any byte in the buffer
Size Resize/create the data buffer in memory
Value Set/Get the data from the buffer
Clear Clear (make zeros) the memory buffer
Empty Remove the memory buffer (free the memory occupied)
Bit Access any particular bit in the memory buffer
Unit Read/Write typed values in any specified place the buffer.
String Read/Write ANSI string values in any position in the buffer.
UnicodeString Read/Write UNICODE string values in any position in the buffer.
ByteOrder Configure byte ordering for the non-string values.
UnicodeByteOrder Configure byte ordering for the string values.
Data Get/put part of the buffer (from v.2.5.0)
Slice Copy part of the buffer in a new SFBinaryData object. (from v.2.5.0)
 

Supported on:

Windows 95/NT and later
Windows CE 3.0 and later
Pocket PC/Windows Mobile 2003 and later
Windows CE.NET 4 and later

newObjects Copyright 2001-2006 newObjects [ ]