protected long getLongFromByteArray(byte[] bytes) {
    long value = 0;
    for (final byte aByte : bytes) {
      value = (value << 8) + (aByte & 0xff);
    }
    return value;
  }
A buffer to read and decode the first line.
geode-memcached/src/main/java/org/apache/geode/internal/memcached/commands/AbstractCommand.java