binary files:
word16 format; Byte order is little endian; they stor short values
Now I want to parse these files, getting the short values and write them in ASCII format to a new file, using Java's New IO. I made a channel and a buffer:
FileChannel fcOut = new FileInputStream(file).getChannel();
ByteBuffer buff = fcOut.map(FileChannel.MapMode.READ_ONLY, 0,fcOut.size());
...
but I have no clue how to convert the input. I tried a lot, but I always get much too much output (the file size extended 10 times the size of the original file).
I believe it must be really easy, but, as I'm rather new to OOP/Java, I have no idea. Any suggestions?
word16 format; Byte order is little endian; they stor short values
Now I want to parse these files, getting the short values and write them in ASCII format to a new file, using Java's New IO. I made a channel and a buffer:
FileChannel fcOut = new FileInputStream(file).getChannel();
ByteBuffer buff = fcOut.map(FileChannel.MapMode.READ_ONLY, 0,fcOut.size());
...
but I have no clue how to convert the input. I tried a lot, but I always get much too much output (the file size extended 10 times the size of the original file).
I believe it must be really easy, but, as I'm rather new to OOP/Java, I have no idea. Any suggestions?