io.deephaven.proto.util.ByteHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-proto-backplane-grpc Show documentation
Show all versions of deephaven-proto-backplane-grpc Show documentation
The Deephaven proto-backplane-grpc
//
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
//
package io.deephaven.proto.util;
import java.nio.ByteBuffer;
public class ByteHelper {
public static String byteBufToHex(final ByteBuffer ticket) {
StringBuilder sb = new StringBuilder();
for (int i = ticket.position(); i < ticket.limit(); ++i) {
sb.append(String.format("%02x", ticket.get(i)));
}
return sb.toString();
}
}