Skip to content

NDefUriCreator

com.rvi.application.creator.NDefUriCreator · Class · SocialCard 1.0.3

Collect a URI and build a validated link record.

Call uri() with a full address, then build(). Use this builder when constructing several record types with a consistent fluent syntax.

final NDefUri link = new NDefUriCreator()
.uri("mailto:help@example.com")
.build();
System.out.println(link.uri());
Java imports
import com.rvi.application.creator.NDefUriCreator;
import com.rvi.domain.NDefUri;

Add the resulting record to NDefMessageCreator when you are ready to encode it.

uri() stores the input. The builder calls the NDefUri constructor at build(), where the URI is parsed and normalised. You can catch NDefValueException at that point to return an input error to the user.

NDefUri · NDefMessageCreator · NDefValueException

Method signatures in the Javadoc · All API types