Mohan K

Greenhorn
+ Follow
since Oct 04, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mohan K

Heli
I dont know if this will help u.
but try reading the input as character instead of byte and zero out the higher byte.
eg. instead of
byte b = 0xff ;
use
char c = 0xffff ; // your input stream
long l = 0x00ff & c ;
System.out.println("l = c & 0x00ff: l = " + l); //255
2 problems though:
1. You will be one off when you read the next byte (if you are using absolute positioning to read it will not be a problem)
2. I am not sure if you will run into little endian/big endian formats problems
22 years ago