This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a question. This is my first commercial application and I'm having some issues printing four 96 well plates to a text file because I have to point the input stream to the top of the page and ignore the first 41st characters on the same line in order to print plate C. What I'm trying to do will be immediately clear if you see the attachment. I'm processing data from the first plates A and B but having to write B to the right of A and D to the right of C. How would I go about doing this? Eclipse is claiming mark and reset aren't supported by FileWriter, FileReader, etc. I know I could create a temp text file with a and b etc and c and d etc and then merge the two but that doesn't seem like the most efficient/safe option. Plates can go up to Z and AA and etc.
I would read in the data and build a page in memory, then write the whole page to the FileWriter. You can put the data into memory in any order you like.
Joined: Jun 14, 2011
How would you recommend building it into memory? I was thinking maybe like a string object, like an array of strings I guess? Better idea? I know that the number of lines will always be fixed per plate/page, etc.