We could load these constants from the Java fields and store them in our struct DirEnt above, that way the native code doesn't have to be as closely coupled with the DirEnt class definition.  But it will result in slower machine code because we aren't returning constants anymore from a simple function.