Here you can find the source of toBinFromOctChar(final char oct)
public static String toBinFromOctChar(final char oct)
//package com.java2s; //License from project: Open Source License public class Main { public static String toBinFromOctChar(final char oct) { switch (oct) { case '0': return ("000"); case '1': return ("001"); case '2': return ("010"); case '3': return ("011"); case '4': return ("100"); case '5': return ("101"); case '6': return ("110"); case '7': return ("111"); default:/*from ww w.j a va2 s.co m*/ throw new IllegalArgumentException( "The input character \'" + oct + "\'is not a valid octal character."); } } }