Java Long to Byte Array LongToBytes4(long l, byte abyte0[])

Here you can find the source of LongToBytes4(long l, byte abyte0[])

Description

Long To Bytes

License

Apache License

Declaration

public static void LongToBytes4(long l, byte abyte0[]) 

Method Source Code

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

public class Main {
    public static void LongToBytes4(long l, byte abyte0[]) {
        abyte0[3] = (byte) (int) (255L & l);
        abyte0[2] = (byte) (int) ((65280L & l) >> 8);
        abyte0[1] = (byte) (int) ((0xff0000L & l) >> 16);
        abyte0[0] = (byte) (int) ((0xffffffffff000000L & l) >> 24);
    }/*from ww  w. java 2s .  c  om*/
}

Related

  1. longToBytes(long val)
  2. longToBytes(long value)
  3. longToBytes(long value, byte[] array, int offset)
  4. longToBytes(long value, byte[] buffer, int bufferStartPosition)
  5. longToBytes(long value, byte[] buffer, int offset)
  6. LongToBytes8(long l)
  7. LongToBytesLE(final long val)
  8. longToBytesLE(long value, byte[] buffer)
  9. longToBytesLE(long value, byte[] buffer, int offset, int length)