Java ByteBuffer Write writeBER32(ByteBuffer buffer, int value)

Here you can find the source of writeBER32(ByteBuffer buffer, int value)

Description

write BER

License

Open Source License

Declaration

public static void writeBER32(ByteBuffer buffer, int value) 

Method Source Code

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

import java.nio.ByteBuffer;

public class Main {
    public static void writeBER32(ByteBuffer buffer, int value) {
        buffer.put((byte) ((value >> 21) | 0x80));
        buffer.put((byte) ((value >> 14) | 0x80));
        buffer.put((byte) ((value >> 7) | 0x80));
        buffer.put((byte) (value & 0x7F));
    }/*  ww w.ja va  2s .  c o  m*/
}

Related

  1. writeAll(ByteBuffer buf, WritableByteChannel channel)
  2. writeAll(ByteChannel channel, ByteBuffer buffer)
  3. writeAll(GatheringByteChannel ch, ByteBuffer... bbs)
  4. writeAllToChannel(List buffers, WritableByteChannel channel)
  5. writeBE(ByteBuffer bb, int elementWidth, long value)
  6. writeBigInteger(ByteBuffer bb, BigInteger bigInteger, int length)
  7. writeBlock(String fileName, long startOffset, ByteBuffer buffer, Logger log)
  8. writeBooleanArray(boolean[] array, ByteBuffer out)
  9. writeBuffer(ByteBuffer dest, ByteBuffer src)