Should we add this to the Java API too?