Reference for Processing (BETA) version 0135+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Name

saveBytes()

Examples
byte[] nums = { 0, 34, 5, 127, 52};

// now write the bytes to a file
saveBytes("numbers.dat", nums);
Description Opposite of loadBytes(), will write an entire array of bytes to a file. The data is saved in binary format. This file is saved to the sketch's folder, which is opened by selecting "Show sketch folder" from the "Sketch" menu.



It is not possible to use saveXxxxx() methods inside a web browser unless the sketch is signed. To save a file back to a server, see the save to web example.
Syntax
saveBytes(filename, bytes)
Parameters
filename name of file to write to
bytes array of bytes to be written
Usage Application
Related loadStrings()
loadBytes()
saveStrings()
Updated on February 09, 2008 04:38:52pm PST

Creative Commons License