Storages & Files Slice method
Slice method.

This method is much like the Data property, but instead of the byte array returned by the Data property it returns the addressed slice as new SFBinaryData object initialized with the bytes from the start to end position (including it).

Syntax:

Set o = object.Slice(start [, end]])

Parameters:

start - 0 based index of the start byte in the buffer

end - 0 based index of the end byte in the buffer  Default is -1 - return the bytes from start to the end of the buffer.

Remarks:

When you need to pass a slice from the SFBinaryData buffer to another object expecting binary data the Data property will do fine, but if you need to work directly with that slice further the Slice method will return it ready for further use.

The method is not affected by the byte order. 

Applies to: SFBinaryData object

See also: Size and Value properties, the Slice method.

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 [ ]