Java Long to longToNetworkBytes(long value)

Here you can find the source of longToNetworkBytes(long value)

Description

long To Network Bytes

License

Open Source License

Declaration

public static byte[] longToNetworkBytes(long value) 

Method Source Code

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

public class Main {
    public static byte[] longToNetworkBytes(long value) { // TODO: rename me
        return new byte[] { (byte) (value >>> 56), (byte) (value >>> 48), (byte) (value >>> 40),
                (byte) (value >>> 32), (byte) (value >>> 24), (byte) (value >>> 16), (byte) (value >>> 8),
                (byte) value, };
    }// www . j av a2s. c o  m
}

Related

  1. longToLittleEndianBytes(long value, byte[] destination, int offset, int length)
  2. longToN62(long l)
  3. longToName(long l)
  4. longToNBuf(long l, char[] chars)
  5. longToNetworkByteOrderArray(long addr)
  6. longToNumberWithDecimalPlaces(long longValue, int decimalPlaces)
  7. LongToOctString(final long value)
  8. longToOther(Object val, Class dest)
  9. longToPrefixCoded(final long val, final int shift, final char[] buffer)