Java Long to LongToOctString(final long value)

Here you can find the source of LongToOctString(final long value)

Description

Long To Oct String

License

Creative Commons License

Declaration

public final static String LongToOctString(final long value) 

Method Source Code

//package com.java2s;
//License from project: Creative Commons License 

public class Main {
    public final static String LongToOctString(final long value) {
        final String string = Long.toString(value, 8).toUpperCase();

        if (string.charAt(0) == '-') {
            return "-0" + string.substring(1, string.length()) + "L";
        } else {/*w ww. jav  a  2  s.c  o m*/
            return "0" + string + "L";
        }
    }
}

Related

  1. longToName(long l)
  2. longToNBuf(long l, char[] chars)
  3. longToNetworkByteOrderArray(long addr)
  4. longToNetworkBytes(long value)
  5. longToNumberWithDecimalPlaces(long longValue, int decimalPlaces)
  6. longToOther(Object val, Class dest)
  7. longToPrefixCoded(final long val, final int shift, final char[] buffer)
  8. longToRegisters(long v)
  9. longToRemoteAddrTo(long remoteAddr)