Skip to content

ReaderRepository

com.rvi.application.ReaderRepository · Class · SocialCard 1.0.3

Translate validated NDEF messages into reads and writes on a PC/SC card channel.

Use ReaderService for the full connection lifecycle. Construct this repository only when your integration already owns an appropriate CardChannel. Call read() for a validated message and write(message) to replace it.

static List<String> readLinks(final CardChannel channel) throws CardException {
final IReaderRepository repository = new ReaderRepository(channel);
return new NDefDecoder().decodeURIs(repository.read());
}
Java imports
import com.rvi.application.IReaderRepository;
import com.rvi.application.NDefDecoder;
import com.rvi.application.ReaderRepository;
import java.util.List;
import javax.smartcardio.CardChannel;
import javax.smartcardio.CardException;

This method receives an existing channel. The caller retains responsibility for the connection.

The repository reads the capability container and checks access and bounds. Writes use four-byte pages. It marks the first page as an incomplete write, updates subsequent pages and clears stale bytes, then publishes the first page and verifies the message by reading it back.

IReaderRepository · ReaderService · TlvEncoder · TlvDecoder · CardCapacityException

Method signatures in the Javadoc · All API types