Re: recommendation for dealing with legacy data
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Fri, 28 Apr 2006 16:56:12 GMT
"Jeff Kish" <jeff.kish@xxxxxxx> wrote in message news:nlb252pl5pblr7kklm3ngn9sfkgpoa35in@xxxxxxxxxx
Greetings.
I am not too awfully advanced when it comes to java programming, but I have
done a fair amount of c/c++.
I have some legacy data files which are fixed length binary.
I'd like to figure out the best way to read the files from a java program that
may be running on any variety of platforms, and subsequently process the data.
The data fields in each record in the file may have '\n', nulls or any other
data.
Can someone recommend the best way, or even a good way to go about reading
this file and taking the 1st n bytes and processing it etc. I'll need to
find/recognize/skip '\n' etc.
The datafiles will always have come from a Wintel machine, using probably the
default western character set whatever the heck that is.
Any gotchas/watch out fors/etc would be appreciated.
There are too many "ors" and "etcs." here for me to make much sense of the nature of your files. If it's arbitrary binary data, what's wrong with using java.io.FileInputStream to turn your file into a stream of bytes, and working from there?
I don't understand what you mean by "I'll need to find/recognize/skip '\n' etc." Why would the '\n' character be treated specially in arbitrary binary data? It's fixed length, so surely this character isn't acting as a seperator, right?
- Oliver
.
- References:
- recommendation for dealing with legacy data
- From: Jeff Kish
- recommendation for dealing with legacy data
- Prev by Date: Re: Give me some advice about some books of Java programing!
- Next by Date: Re: instanceOf operator new bie question
- Previous by thread: Re: recommendation for dealing with legacy data
- Next by thread: Image doesn't display properly
- Index(es):
Relevant Pages
|