Reference for Processing version 1.5. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

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

Returns | None
Usage | Application
Related | loadStrings() loadBytes() saveStrings()

Updated on August 30, 2010 04:29:39pm EDT