Added 1D conversions to Java and C++