Also, do you think it would be interesting if we use Apache Commons libraries? Maybe there are a ready to use solution there.
On Thu, Nov 10, 2011 at 3:59 PM, Aliaksandr Autayeu <[email protected]>wrote: > Sounds interesting. And I would be cautions to avoid reinventing the wheel > - the standard Java way is quite good. But may be I don't understand the > code or your proposal well enough yet. James, may be before jumping into > it, you can make a small before-after sample piece of code to illustrate > better your idea? A snap of code before, a snap of code after. And a snap > of "client" code before and after? What do you think? > > regards, > Aliaksandr > > On Thu, Nov 10, 2011 at 5:36 AM, James Kosin <[email protected]> > wrote: > > > Everyone, > > > > Me again. I'm going to be refactoring a lot of the file handling to > > abstract away the encoding and making it a bit more seamless so everyone > > doesn't have to always remember to do this or do that. Basically, what > I'm > > proposing is something like this. > > > > 1) A new class called EncodedFile that everyone will have to use when > > opening and reading data from a file. Much like a Steam object or what > we > > already do... Only it will be one class handling the input/output for the > > files. > > > > 2) This class will also provide methods to get a output and input steams > > like the stdio System.out and System.in variables; or be able to replace > > them with new ones that have the correct encoding specified. > > > > 3) We may also want to be able to specify the input and output encoding > > separately... So, I'll be adding some of that; however, the first version > > may only be able to support one for both initially. > > > > Let me know if anyone wants anything else added to this list. > > > > Thanks, > > James > > >
