Java Long to Byte longToByte(byte[] buf, int off, long value)

Here you can find the source of longToByte(byte[] buf, int off, long value)

Description

long To Byte

License

Open Source License

Declaration

public static void longToByte(byte[] buf, int off, long value) 

Method Source Code

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

public class Main {
    public static void longToByte(byte[] buf, int off, long value) {
        buf[off + 0] = (byte) (value >>> 56);
        buf[off + 1] = (byte) (value >>> 48);
        buf[off + 2] = (byte) (value >>> 40);
        buf[off + 3] = (byte) (value >>> 32);
        buf[off + 4] = (byte) (value >>> 24);
        buf[off + 5] = (byte) (value >>> 16);
        buf[off + 6] = (byte) (value >>> 8);
        buf[off + 7] = (byte) (value >>> 0);
    }/*from w  ww .  ja  v a  2s . c om*/
}

Related

  1. long2Byte(byte[] bytes, long value, int offset)
  2. Long2Byte(long i)
  3. long2byte(long ival, byte b[], int offset)
  4. long2byte(long l)
  5. long2byte(long l)
  6. longToByte(final long value)
  7. longToByte(long a_value)
  8. longToByte(long i)
  9. longToByte(long i_Value)