Java Integer to IntToOctString(final int value)

Here you can find the source of IntToOctString(final int value)

Description

Int To Oct String

License

Creative Commons License

Declaration

public final static String IntToOctString(final int value) 

Method Source Code

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

public class Main {
    public final static String IntToOctString(final int value) {
        final String string = Integer.toString(value, 8).toUpperCase();

        if (string.charAt(0) == '-') {
            return "-0" + string.substring(1, string.length());
        } else {//from   ww w.j a  v  a2 s.  co m
            return "0" + string;
        }
    }
}

Related

  1. intToMmss(int ns)
  2. intToNetworkByteOrder(int num, byte[] buf, int start, int count)
  3. intToNetworkByteOrder(int num, int count)
  4. intToNumericFormat(int src)
  5. intToOctal(int value)
  6. intToOneByte(int i)
  7. intToOneByte(int value)
  8. intToOneByteArray(int number)
  9. IntToPackage(int pack)