- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
27 lines
930 B
Java
27 lines
930 B
Java
package androidx.room.util;
|
|
|
|
import androidx.annotation.RestrictTo;
|
|
import java.nio.ByteBuffer;
|
|
import java.util.UUID;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
|
|
/* loaded from: classes.dex */
|
|
public final class UUIDUtil {
|
|
public static final UUID convertByteToUUID(byte[] bytes) {
|
|
Intrinsics.checkNotNullParameter(bytes, "bytes");
|
|
ByteBuffer wrap = ByteBuffer.wrap(bytes);
|
|
return new UUID(wrap.getLong(), wrap.getLong());
|
|
}
|
|
|
|
public static final byte[] convertUUIDToByte(UUID uuid) {
|
|
Intrinsics.checkNotNullParameter(uuid, "uuid");
|
|
ByteBuffer wrap = ByteBuffer.wrap(new byte[16]);
|
|
wrap.putLong(uuid.getMostSignificantBits());
|
|
wrap.putLong(uuid.getLeastSignificantBits());
|
|
byte[] array = wrap.array();
|
|
Intrinsics.checkNotNullExpressionValue(array, "buffer.array()");
|
|
return array;
|
|
}
|
|
}
|