class BinaryDataResourceConverter implements ResourceConverter<Resource, ClientFile> {

    @Override
    public Resource toServer(ClientFile clientObject, ToServerConversionOptions options) throws IllegalParameterValueException, MandatoryParameterNotFoundException {
        return toServer(clientObject, fileResourceTypes.contains(clientObject.getType().toString()) ? new FileResourceImpl() : new ContentResourceImpl(), options);
    }

}