Java Long to Byte long2byte(long ival, byte b[], int offset)

Here you can find the source of long2byte(long ival, byte b[], int offset)

Description

longbyte

License

Open Source License

Declaration

public static void long2byte(long ival, byte b[], int offset) 

Method Source Code

//package com.java2s;

public class Main {
    /** *///from  w w w.  j a  v a2  s  .  c  o  m
    public static void long2byte(long ival, byte b[], int offset) {
        int bits = 64;

        for (int i = 0; i < 8; i++) {
            bits -= 8;
            b[offset + i] = (byte) ((ival >> bits) & 0xff);
        }
    }
}

Related

  1. long2byte(byte[] b, long a)
  2. long2Byte(byte[] bytes, long value, int offset)
  3. Long2Byte(long i)
  4. long2byte(long l)
  5. long2byte(long l)
  6. longToByte(byte[] buf, int off, long value)
  7. longToByte(final long value)