I just burnt out, been working on this ten days and have 1,800 lines of code. Am beginning to spin on how to store the data. I have one file I am generating test runs from, doing decent at it. I have placed markers in the data to find the five or ten fields with regexes, slow for a few hours but arrived at a design pattern that I just replicated for each of the fields. Somewhat clumsy but it works.
All the data that matters is vewable by client, and may be any of
ascii / UTF-8 \u0020 through \u007e but regexes seem to be feed-forward only and make indeterminate conditions trying to arrive at patterns that regex functions well with that are not likely to be entered by user interface. I have a specialized class I rebuilt earlier today that makes field / value access cleanly all in one place in the code base. I am considering some sort of binary character and a dedicated data file buried in the folder tree. Moments ago I wrote the following test code:
|
Code:
|
public class test
{
private static transient final java.lang.Character ETB= new java.lang.Character('\u001c');// end of transmission block
private static transient final java.lang.Character GS = new java.lang.Character('\u001d');// group separator
private static transient final java.lang.Character RS = new java.lang.Character('\u001e');// record separator
private static transient final java.lang.Character US = new java.lang.Character('\u001f');// unit seprator
String etb = new String("// end of transmission block ");
String gs = new String("// group separator ");
String rs = new String("// record separator ");
String us = new String("// unit seprator ");
public static void main(String[] args)
{
// C:\\Documents and Settings\\All Users\\Documents\\Reports
try
{
test tes= new test();
java.io.FileWriter fw = new java.io.FileWriter("__blanked for posting__");//
fw.write(US);
fw.write(tes.etb,0,tes.etb.length());
fw.write(GS);
fw.write(tes.gs,0,tes.gs.length());
fw.write(RS);
fw.write(tes.rs,0,tes.rs.length());
fw.write(US);
fw.write(tes.us,0,tes.us.length());
fw.flush();fw.close();
}
catch(java.lang.Throwable t){System.out.println(t.toString());}
}
} |
and opened the file with a text editor. Bad Bean if people who use this open the file with a Word Processor, just the sort of thing that could happen. Ideally, I would cleanly separate the data storage from display, but if I do not make the data readable with standard text editors, crash recover becomes bloated with all the places in the code that have to allow for that moment, I would rather have a jump-gap measure that gets over the moment and leads to open ended improvement.
Not to be demeaning, user is a twit. I have to allow for this.
I do not mind writing a great deal of code if it will deal with this, weak encipherment is appealing but makes data recovery a "get it right the first time." issue.