2009-02-22, 07:02 PM
This is not related to MapleStory, but it's the technical help section anyways xD If this is inappropriate and it needs to be moved to Rubik's Cube, then do so.
So my current problem is that I want to modify a 2 Mb+ .txt file log to a specific format of my liking. Trying to do this manually is going to take forever, not to mention my computer is pretty slow at updating Notepad in the beginning (but not the end).
One way I've plotted to solving this problem is using programming; in my case, it's Java's FileInputStream (the log has non-alphanumeric characters, which regex utterly fails at working with). But there seems to be a big problem for which I can't find the answer to. Whenever I call the read() method, I always get a null byte (value = 0). Actually in fact FileInputStream seems to think that all of the bytes in the file are null. This is not true. The available() method works fine, and everything else works fine as far as I can tell. read() works fine with any other kinds of data files.
FileReader class also gives me the same BS that FileInputStream does.
What's going on here? And can I get the code to work correctly?
So my current problem is that I want to modify a 2 Mb+ .txt file log to a specific format of my liking. Trying to do this manually is going to take forever, not to mention my computer is pretty slow at updating Notepad in the beginning (but not the end).
One way I've plotted to solving this problem is using programming; in my case, it's Java's FileInputStream (the log has non-alphanumeric characters, which regex utterly fails at working with). But there seems to be a big problem for which I can't find the answer to. Whenever I call the read() method, I always get a null byte (value = 0). Actually in fact FileInputStream seems to think that all of the bytes in the file are null. This is not true. The available() method works fine, and everything else works fine as far as I can tell. read() works fine with any other kinds of data files.
FileReader class also gives me the same BS that FileInputStream does.
code
What's going on here? And can I get the code to work correctly?

