private String printOFormat(int x){
  String sx=null;
  if (x == Integer.MIN_VALUE)   sx="20000000000";
 else   if (x < 0) {
    String t=Integer.toString((~(-x - 1)) ^ Integer.MIN_VALUE,8);
switch (t.length()) {
case 1:
      sx="2000000000" + t;
    break;
case 2:
  sx="200000000" + t;
break;
case 3:
sx="20000000" + t;
break;
case 4:
sx="2000000" + t;
break;
case 5:
sx="200000" + t;
break;
case 6:
sx="20000" + t;
break;
case 7:
sx="2000" + t;
break;
case 8:
sx="200" + t;
break;
case 9:
sx="20" + t;
break;
case 10:
sx="2" + t;
break;
case 11:
sx="3" + t.substring(1);
break;
}
}
 else sx=Integer.toString(x,8);
return printOFormat(sx);
}

private String printOFormat ( int x ) { String sx = null ; if ( x == Integer . MIN_VALUE ) sx = "20000000000" ; else if ( x < 0 ) { String t = Integer . toString ( ( ~ ( - x - 1 ) ) ^ Integer . MIN_VALUE , 8 ) ; switch ( t . length ( ) ) { case 1 : sx = "2000000000" + t ; break ; case 2 : sx = "200000000" + t ; break ; case 3 : sx = "20000000" + t ; break ; case 4 : sx = "2000000" + t ; break ; case 5 : sx = "200000" + t ; break ; case 6 : sx = "20000" + t ; break ; case 7 : sx = "2000" + t ; break ; case 8 : sx = "200" + t ; break ; case 9 : sx = "20" + t ; break ; case 10 : sx = "2" + t ; break ; case 11 : sx = "3" + t . substring ( 1 ) ; break ; } } else sx = Integer . toString ( x , 8 ) ; return printOFormat ( sx ) ; }
format method for the o conversion character and int argument . < p / > for o format , the flag character ' - ' , means that the output should be left justified within the field . the default is to pad with blanks on the left . the ' # ' flag character means that the output begins with a leading 0 and the precision is increased by 1 . < p / > the field width is treated as the minimum number of characters to be printed . the default is to add no padding . padding is with blanks by default . < p / > the precision , if set , is the minimum number of digits to appear . padding is with leading 0s .
