porting type from C to java