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:

Wolfram Research (2017), ImportByteArray, Wolfram Language function, https://reference.wolfram.com/language/ref/ImportByteArray.html.

Text

Wolfram Research (2017), ImportByteArray, Wolfram Language function, https://reference.wolfram.com/language/ref/ImportByteArray.html.

CMS

Wolfram Language. 2017. "ImportByteArray." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ImportByteArray.html.

APA

Wolfram Language. (2017). ImportByteArray. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImportByteArray.html

BibTeX

@misc{reference.wolfram_2024_importbytearray, author="Wolfram Research", title="{ImportByteArray}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/ImportByteArray.html}", note=[Accessed: 14-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_importbytearray, organization={Wolfram Research}, title={ImportByteArray}, year={2017}, url={https://reference.wolfram.com/language/ref/ImportByteArray.html}, note=[Accessed: 14-December-2024 ]}