MCPcopy Index your code
hub / github.com/processing/processing / read

Method read

java/libraries/net/src/processing/net/Client.java:390–401  ·  view source on GitHub ↗

( begin auto-generated from Client_read.xml ) Returns a number between 0 and 255 for the next byte that's waiting in the buffer. Returns -1 if there is no byte, although this should be avoided by first cheacking available() to see if any data is available. ( end auto-generated ) @webref cli

()

Source from the content-addressed store, hash-verified

388 * @brief Returns a value from the buffer
389 */
390 public int read() {
391 synchronized (bufferLock) {
392 if (bufferIndex == bufferLast) return -1;
393
394 int outgoing = buffer[bufferIndex++] & 0xff;
395 if (bufferIndex == bufferLast) { // rewind
396 bufferIndex = 0;
397 bufferLast = 0;
398 }
399 return outgoing;
400 }
401 }
402
403
404 /**

Callers 2

readCharMethod · 0.95
runMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected