Current Forum: Homework 4 - Huffman Trees (Part 1) |
Date: Mon Oct 8 2001 11:30 pm |
Author: Cipriani, Jason A. <jac4@andrew.cmu.edu> |
Subject: Re: general clarification on FileBitReader/Writer classes |
|
|
well, readByte() almost gets the ascii character value...
unfortunately it does not, due to a very poor choice of having the return value be "byte" (-128 to 127, or something like that).
whoever wrote that, bad call on using "byte".
the workaround is:
byte theByte = input.readByte(); if (theByte < 0) theByte += 256;
jason |
|