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