Other features
| Find | Returns a Long specifying the position of the first occurrence of the data binary array. | |
| FindRev | Returns a Long specifying the position of the first occurrence of the data in binary array from the end of data. | |
| CharSetConvert | Converts bytearray (as CharSet/CodePage code page) to another charset/code page. | |
| Left | Returns Length bytes from the left of array | |
| Mid | Returns data from middle of the array. | |
| ReadFrom | Reads data from file. | |
| Right | Returns Length bytes from the right of array | |
| SaveAs | Saves the ByteArray data as a file. | |
| SetSize | Sets a new size of binary data. If old size is greter than new size, data is truncated to the new size. |
| Base64 | Converts data between ByteArray (safearray of bytes) and Base64. Works as a Base64 encoder and decoder from binary (bytearray) or from Unicode String. |
| Variant, RW | |
| ByteArray | Contens of ByteArray object as byte safearray or one byte from array. |
| Variant, RW | |
| CodePage | Code page for converting between binary and String data. |
| ConvertCodePages, RW | |
| HexString | Returns contents of the ByteArray as hexadecimal string (base16 string) |
| String, RW | |
| CharSet | String representation of a CodePage. This value specifies the code page of a source binary data for binary to unicode String conversion. |
| String, RW | |
| Length | Length of the data. |
| Long, RW | |
| Punycode | Returns unicode String as punycode encoded string. You can directly convert data from/to any charset to punycode using this property. |
| String, RW | |
| String | Returns (or sets) the data as a string. The binary data are converted to/from a unicode string using CodePage. |
| String, RW |
| ||
<Script RunAt=Server Language=VBScript>
WriteFileToClient "c:\images\adv88.gif"
Sub WriteFileToClient(File)
Dim ByteArray
Set ByteArray = CreateObject("ScriptUtils.ByteArray")'Creates the ByteArray object
ByteArray.ReadFrom(File)
Response.AddHeader "Content-Length", ByteArray.Length
Response.ContentType = "image/GIF"
Response.BinaryWrite ByteArray.ByteArray'Returns byte safearray (VT_UI1)
ByteArray = Empty
End Sub
</Script> |
|
|
|
|
|
| ||
| Download help from www.motobit.com |