MCPcopy Index your code
hub / github.com/arduino/Arduino / loadBytesRaw

Method loadBytesRaw

app/src/processing/app/Base.java:2221–2237  ·  view source on GitHub ↗

Same as PApplet.loadBytes(), however never does gzip decoding.

(File file)

Source from the content-addressed store, hash-verified

2219 * Same as PApplet.loadBytes(), however never does gzip decoding.
2220 */
2221 static public byte[] loadBytesRaw(File file) throws IOException {
2222 int size = (int) file.length();
2223 FileInputStream input = null;
2224 try {
2225 input = new FileInputStream(file);
2226 byte buffer[] = new byte[size];
2227 int offset = 0;
2228 int bytesRead;
2229 while ((bytesRead = input.read(buffer, offset, size - offset)) != -1) {
2230 offset += bytesRead;
2231 if (bytesRead == 0) break;
2232 }
2233 return buffer;
2234 } finally {
2235 IOUtils.closeQuietly(input);
2236 }
2237 }
2238
2239
2240 /**

Callers 1

buildZipMethod · 0.95

Calls 1

readMethod · 0.45

Tested by

no test coverage detected