public static OwncloudFileResource toOwncloudFileResource ( OwncloudResource owncloudResource ) throws OwncloudNoFileResourceException { if ( owncloudResource == null ) { return null ; } if ( isDirectory ( owncloudResource ) || ! ClassUtils . isAssignable ( owncloudResource . getClass ( ) , OwncloudFileResource . class ) ) { throw new OwncloudNoFileResourceException ( owncloudResource . getHref ( ) ) ; } return ( OwncloudFileResource ) owncloudResource ; }
Convert a OwncloudResource to a OwncloudFileResource .