ImportByteArray

Listing of Formats »

ImportByteArray[ba,"format"]

imports data in the specified format from a ByteArray object.

ImportByteArray[ba,elements]

imports the specified elements.

ImportByteArray[ba]

attempts to determine the format automatically.

Details

Examples

open allclose all

Basic Examples  (1)

Export an image as a ByteArray object:

Import the bytes to produce the original image:

Import an element from the bytes:

Scope  (2)

Export a typeset mathematical formula as a ByteArray object:

Import the bytes to produce a resolution-independent version of the formula:

Export a color map and corresponding raw data as a ByteArray object:

Import the bytes to produce the original animated GIF image:

Import a color map and corresponding raw data from a ByteArray:

Applications  (2)

Store an integer into a ByteArray:

Retrieve the number from the byte array:

Store a big number into a "Base64" encoded ByteArray:

Retrieve the number from the byte array:

Verify the result:

Properties & Relations  (2)

ImportByteArray returns the same result as ByteArrayToString followed by ImportString:

Import can be viewed as a combination of ReadByteArray and ImportByteArray:

Possible Issues  (1)

A list of bytes is returned when ImportByteArray cannot automatically determine the format:

Specify the format to get a string result:

Introduced in 2017
 (11.2)