saveBytes()

本参考资料用于Processing 3.0+。 如果你使用的是前一版本,请在使用软件帮助菜单内的参考资料。. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.

名称

saveBytes()

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

 // Writes the bytes to a file saveBytes("numbers.dat", nums);

描述 As the opposite of loadBytes(), this function 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. Alternatively, the files can be saved to any location on the computer by using an absolute path (something that starts with / on Unix and Linux, or a drive letter on Windows).
语法
saveBytes(filename, data)
参数
filename String: name of the file to write to
data byte[]: array of bytes to be written
返回值 void
相关 loadStrings()
loadBytes()
saveStrings()

Updated on October 2, 2018 05:02:07pm EDT

saveBytes()