Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

BinaryWrite

Usage

BinaryWrite[channel, b] writes a byte of data, specified as an integer from 0 to 255.
BinaryWrite[channel, { ,  , ... }] writes a sequence of bytes.
BinaryWrite[channel, "string"] writes the raw sequence of characters in a string.
BinaryWrite[channel, x, type] writes an object of the specified type.
BinaryWrite[channel, { ,  , ... }, type] writes a sequence of objects of the specified type.
BinaryWrite[channel, { ,  , ... }, { ,  , ... }] writes a sequence of objects with a sequence of types.


Notes

BinaryWrite supports the same types as BinaryRead.
• The output channel used by BinaryWrite can be a single file or pipe, or list of them, each specified by a string giving their name, or by an OutputStream object that has been opened with BinaryFormat->True.
• If any of the specified files or pipes are not already open, BinaryWrite calls OpenWrite to open them.
BinaryWrite does not close files and pipes after it finishes writing to them.
• When a list of types is given, the list is effectively repeated as many times as necessary.
• The following option can be given:
ByteOrdering $ByteOrdering what byte ordering to use
BinaryWrite[channel, "string"] uses type "Character8", so all characters in "string" should have character code in the range 0-255.
BinaryWrite returns $Failed if it encounters a data element that cannot match the type specified.
• See also: BinaryRead, WriteString, Export.
• New in Version 5.1.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: