Java ByteBuffer Write writeUUID(ByteBuffer buffer, UUID uuid)

Here you can find the source of writeUUID(ByteBuffer buffer, UUID uuid)

Description

write UUID

License

Open Source License

Declaration

public static void writeUUID(ByteBuffer buffer, UUID uuid) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.IOException;

import java.nio.ByteBuffer;

import java.util.UUID;

public class Main {
    public static void writeUUID(ByteBuffer buffer, UUID uuid) throws IOException {
        buffer.putLong(uuid.getMostSignificantBits());
        buffer.putLong(uuid.getLeastSignificantBits());
    }/* ww w  .j a va 2 s. co  m*/
}

Related

  1. writeUnsigned(int num, int size, ByteBuffer out)
  2. writeUnsignedInt(ByteBuffer buf, long value)
  3. writeUnsignedInt(final ByteBuffer buffer, final long value)
  4. writeUnsignedVarInt(int value, ByteBuffer dest)
  5. writeUTF8StringToByteBuffer(String str, ByteBuffer bb)
  6. writeV(ByteBuffer byteBuffer, List vint)
  7. writeVarint(int value, ByteBuffer buffer)
  8. writeVarLong(ByteBuffer buff, long x)
  9. writeVarLong(ByteBuffer buff, long x)