commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38246] New: - BinaryCodec.toAsciiString outputs answer in reverse byte order.
Date Thu, 12 Jan 2006 20:02:49 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38246>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38246

           Summary: BinaryCodec.toAsciiString outputs answer in reverse byte
                    order.
           Product: Commons
           Version: 1.3 Final
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Codec
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: albertcin@excite.com


In Codec 1.3,
BinaryCodec.toAsciiString outputs answer in reverse byte order.  For example:
byte [0,1,2] becomes [00000010,00000001,00000000].

BeanShell output:

BinaryCodec.toAsciiString reverses the input byte array.
bsh % hex = "0077FF";
<0077FF>
bsh % bytes = Hex.decodeHex(hex.toCharArray());
<[B@1d520c4>
bsh % bytes[0];
<0>
bsh % bytes[1];
<119>
bsh % bytes[2];
<-1>
bsh % BinaryCodec.toAsciiString(bytes);
<111111110111011100000000>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message