mri.fortune
Class StrFile

java.lang.Object
  |
  +--mri.fortune.StrFile

public class StrFile
extends java.lang.Object

 StrFile - Java port of Berkeley strfile.c
 create a random access file for storing strings

TODO:
 order the strings, ROT13
 

Version:
$Revision: 1.1$
Author:
M Riess
See Also:
Fortune

Field Summary
static java.lang.String DEFAULT_EXT
           
static char defChar
           
static int STR_DEFAULT
           
static int STR_ORDERED
           
static int STR_RANDOM
           
static int STR_ROTATED
           
static int VERSION
           
 
Method Summary
static void main(java.lang.String[] args)
          StrFile [-iorsx] [-c char] sourcefile [outputfile] StrFile reads a file containing groups of lines separated by a line containing a single percent `%' sign (or other specified delimiter character) and creates a data file which contains a header structure and a table of file offsets for each group of lines.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defChar

public static final char defChar

DEFAULT_EXT

public static final java.lang.String DEFAULT_EXT

STR_DEFAULT

public static final int STR_DEFAULT

STR_RANDOM

public static final int STR_RANDOM

STR_ORDERED

public static final int STR_ORDERED

STR_ROTATED

public static final int STR_ROTATED

VERSION

public static final int VERSION
Method Detail

main

public static void main(java.lang.String[] args)
StrFile [-iorsx] [-c char] sourcefile [outputfile] StrFile reads a file containing groups of lines separated by a line containing a single percent `%' sign (or other specified delimiter character) and creates a data file which contains a header structure and a table of file offsets for each group of lines. This allows random access of the strings.
Parameters:
-i - ignore case
-o - Order the strings in alphabetical order.
-r - Randomize access to the strings.
-s - Run silently; don't give a summary message when finished.
-x - Note that each alphabetic character in the groups of lines is rotated 13 positions in a simple caesar cypher.
-c - "char" Change the delimiting character from the percent sign to char.
sourcefile - ignore case
outputfile - The output file, if not specified on the command line, is named sourcefile.dat.