The basic things is to keep in correct place input/output value as string and the numerical value as number, which is one suitable format suitable for calculations.
So what really happens is that your have two processes input
'some numbers' -> value('some numbers')
value -> string representation of value in any desired base
Also you do not find function to directly translate string to input base7 number and output it in base 3, but you can read the value of base7 number and you can output the value of your variable in base7. It is two step process.
If you want to use base -2 probably you are out of luck in Java (which I know only superficially) as you are in Python (which I consider myself knowing reasonably well), and must roll out your own function.
Use Integer.valueOf(String s, int radix) to parse your input string with whatever base you want (radix = 2 for binary, 16 for hex etc). That gives you an int. Then use Integer.toString(int i, int radix) to covert that int to any other base. eg
int i = Integer.valueOf("1101", 2); // parse 1101 as binary
System.out.println( Integer.toString(i, 8)); // print it out in octal