List of utility methods to do ByteBuffer to Long
long | toLong(ByteBuffer buffer) Convert buffer to an long. long val = 0; boolean started = false; boolean minus = false; for (int i = buffer.position(); i < buffer.limit(); i++) { byte b = buffer.get(i); if (b <= SPACE) { if (started) break; ... |
long | toLong(ByteBuffer bytes) to Long return bytes.getLong(bytes.position());
|
long | toLong(ByteBuffer value) to Long long result = 0; try { if (value != null) { int originPos = value.position(); result = value.getLong(); value.position(originPos); } catch (Exception ex) { ... |