Here you can find the source of IntToOctString(final int value)
public final static String IntToOctString(final int value)
//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; } } }