AddressInputStream does not follow the API specification of InputStream. Some issues include:
- read must return values between 0 and 255 (fixed by the attached patch from Da Feng). See also: MRP-97
- read should return -1 at the end of the stream instead of throwing an IOException
- skip is wrong when the parameter value does not fit into an int
We should write a unit tests for this class and fix all issues.