Hi,
I have a C++ utility that I've written, which performs an archaic Universal Business Basic function, converting 2 bytes to 3 characters.
The function worked, but was generating erroneous results when called repetitously over a data file.
The solution was to set the flag from 'skipws' to 'noskipws'. This fixed everything.
Now that I have the function converted for use in one of my java applications, I'm getting the same erroneous pattern.
I'm using a FileInputStream, wrapped in a BufferedInputStream. (I've tried using a PushbackInputStream to unread, whitespace characters, but it's not working.)
I'm reading into a byte[], then using the ByteBuffer.wrap(buffer) to access the byte array.
Does anyone know how to simulate noskipws in Java?
I have a C++ utility that I've written, which performs an archaic Universal Business Basic function, converting 2 bytes to 3 characters.
The function worked, but was generating erroneous results when called repetitously over a data file.
The solution was to set the flag from 'skipws' to 'noskipws'. This fixed everything.
Now that I have the function converted for use in one of my java applications, I'm getting the same erroneous pattern.
I'm using a FileInputStream, wrapped in a BufferedInputStream. (I've tried using a PushbackInputStream to unread, whitespace characters, but it's not working.)
I'm reading into a byte[], then using the ByteBuffer.wrap(buffer) to access the byte array.
Does anyone know how to simulate noskipws in Java?