Java Long Number From toLongUnsigned(int intValue)

Here you can find the source of toLongUnsigned(int intValue)

Description

Convert a signed int to a unsigned value in a long

License

Open Source License

Parameter

Parameter Description
intValue signed integer value to convert

Return

the unsigned value in a long

Declaration


public static long toLongUnsigned(int intValue) 

Method Source Code

//package com.java2s;
// it under the terms of the GNU Lesser General Public License as published by

public class Main {
    /**/*from w w  w  .  j a  va 2  s. c om*/
     * Convert a signed int to a unsigned value in a long
     * @param intValue    signed integer value to convert
     * @return the unsigned value in a long
     */
    //===================================================================
    public static long toLongUnsigned(int intValue) {
        long mask = 0x7fffffff;
        mask += (long) 1 << 31;
        return (intValue & mask);
    }
}

Related

  1. toLongs(byte[] value, int offset, int num)
  2. toLongs(int[] array)
  3. toLongs(Long[] values)
  4. toLongTime()
  5. toLongTimestamp(Object cell)
  6. toLongValue(byte... bytes)
  7. toLongValue(final Object o)
  8. toLongValue(final String candidateString)
  9. toLongValue(Object value)