Search processing.org:

Reference for Processing version 1.0+. 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

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

Updated on November 22, 2008 08:39:25pm PST