class TLD {

    public static ByteSequence parseRootPointerFromId(ByteSequence id) {
        ArrayList<Integer> dots = instancesOf('.', id);
        int stop;
        if (dots.size() > 2) {
            stop = dots.get(2);
        } else {
            stop = id.length();
        }
        return id.subSequence(0, stop);
    }

    private  TLD();

}