public static void main(String[] args )
    {
        TextNavigator tn = new TextNavigator();
        tn.text = "forbidden treasures. The common folk of the neigh-\n" +
        "borhood, peons of the estancias, vaqueros of the sea-\n" +
        "board plains, tame Indians coming miles to market\n" +
        "with a bundle of sugar-cane or a basket of maize worth\n" +
        "about threepence, are well aware that heaps of shin-\n" +
        "ing gold lie in the gloom of the deep precipices cleav-\n" +
        "ing the stony levels of Azuera. Tradition has it that\n" +
        "many adventurers of olden time had perished in the\n" +
        "search. The story goes also that within men's memory\n" +
        "two wandering sailors--Americanos, perhaps, but\n" +
        "gringos of some sort for certain--talked over a gam-\n" +
        "bling, good-for-nothing mozo, and the three stole a\n" +
        "234a\n" +
        "donkey to carry for them a bundle of dry sticks, a\n" +
        "water-skin, and provisions enough to last a few days.\n" +
        "Thus accompanied, and with revolvers at their belts,\n" +
        "they had started to chop their way with machetes";
        StringBuilder sb = new StringBuilder();
        char t = 0;
        tn.offset = 0;
        //tn.text.length()-1;   // use this for backwards
        while ( t != (char)-1)
        {
            t = tn.next();  // forwards
            // t = tn.prev(); // backwards
            if ( t != (char)-1 )
                sb.append(t);
        }
        // write it out backwards
//        for ( int i=sb.length()-1;i>=0;i-- )
//            System.out.print(sb.charAt(i));
        // use this for forwards
        for ( int i=0;i<sb.length();i++ )
            System.out.print(sb.charAt(i));
    }