public static int getfd(FileDescriptor descriptor)
    {
        Field field = FBUtilities.getProtectedField(descriptor.getClass(), "fd");

        if (field == null)
            return -1;

        try
        {
            return field.getInt(descriptor);
        }
        catch (Exception e)
        {
            JVMStabilityInspector.inspectThrowable(e);
            logger.warn("unable to read fd field from FileDescriptor");
        }

        return -1;
    }
public static int getfd ( FileDescriptor descriptor ) { Field field = FBUtilities . getProtectedField ( descriptor . getClass ( ) , "fd" ) ; if ( field == null ) return - 1 ; try { return field . getInt ( descriptor ) ; } catch ( Exception e ) { JVMStabilityInspector . inspectThrowable ( e ) ; logger . warn ( "unable to read fd field from FileDescriptor" ) ; } return - 1 ; }
Get system file descriptor from FileDescriptor object.
@param descriptor - FileDescriptor objec to get fd from
@return file descriptor, -1 or error