Java Convert via ByteBuffer intToBytesLE(int value)

Here you can find the source of intToBytesLE(int value)

Description

int To Bytes LE

License

Open Source License

Declaration

public static final byte[] intToBytesLE(int value) 

Method Source Code

//package com.java2s;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

public class Main {
    public static final byte[] intToBytesLE(int value) {
        return ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN)
                .putInt(value).array();//from w  w w. j  av  a  2  s.c  o  m
    }
}

Related

  1. intToBytes(final int value)
  2. intToBytes(final int x)
  3. intToBytes(int i, byte[] backingStore, int offset)
  4. intToBytes(int n)
  5. intToBytes(int tagId)
  6. intToBytesWithLen(int x, int len)
  7. long2bytes(long num)
  8. longFromBytes(byte[] array)
  9. longFromBytes(byte[] value)