if (count + index < 0) { logger.log(Level.WARNING, "count: " + count + ", index: " + index + ", buffer: " + new String(buf)); return -1; }
        public byte charAt(int index) {            if (index < 0)                return buf[count + index];            if (index < count)                return buf[index];            return -1;        }