Markus
One very viable alternative is to write the function as a Python user defined transform (UDT). UDT's fit very naturally into a BODS dataflow.
Python's string handling capabilities are the equal of Java
I would be happy to aid you in this if you give me a description of your Java function?