Java ByteBuffer Put putUnsignedByte(ByteBuffer bb, int value)

Here you can find the source of putUnsignedByte(ByteBuffer bb, int value)

Description

put Unsigned Byte

License

LGPL

Declaration

public static void putUnsignedByte(ByteBuffer bb, int value) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.nio.ByteBuffer;

public class Main {
    public static void putUnsignedByte(ByteBuffer bb, int value) {
        bb.put((byte) (value & 0xff));
    }/*w w w.  j  av a 2 s.  c  om*/

    public static void putUnsignedByte(ByteBuffer bb, int position, int value) {
        bb.put(position, (byte) (value & 0xff));
    }
}

Related

  1. putStringToByteBuffer(final ByteBuffer bb, String value, String charset)
  2. putTriByte(ByteBuffer buf, int value)
  3. putTruncatedInt(ByteBuffer bytes, int value, int numBytes)
  4. putUInt16(ByteBuffer buffer, long value)
  5. putUInt32(ByteBuffer buffer, long value)
  6. putUnsignedInt(ByteBuffer buffer, long value)
  7. putUnsignedInt(final ByteBuffer dst, final long value)
  8. putUnsignedShort(ByteBuffer bytes, int value)
  9. putUUID(ByteBuffer bytes, UUID uuid)