You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "O'brien, Tim" <to...@transolutions.net> on 2003/02/04 07:08:24 UTC
[codec] base64 improved....
An improved Base64 was added to a "binary" subpackage of codec. Martin
Redington who is involved in xml-rpc submitted this version of the class as
he has been actively contributing to the xml-rpc effort. This new version
of the Base64 class improves performance of the decode and also is more
compatible with RFC. There is a thread on rpc-dev to this effect:
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=rpc-dev@xml.apache.org&m
sgNo=713
So, [codec] now contains an implementation compatible with the xml-rpc
project, and the next step is to reconcile this version with the needs of
[httpclient].
Possible controversy here may be that the RFC was interpreted as requiring a
terminating newline. The RFC also mentions that a warning or exception
should be thrown when the encoder/decoder encounters invalid characters or
whitespace. My proposal is that we add a series of boolean flags, int
fields to the method signature to allow client projects to specify different
levels of RFC compliance.
public static byte[] encode( byte[] binaryData ) throws EncoderException
public static byte[] encode( byte[] binaryData, int errorLevel ) throws
EncoderException
Where errorLevel would be either Base64.IGNORE, Base64.WARN, or
Base64.EXCEPTION
--------
Tim O'Brien
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
RE: [codec] base64 improved....
Posted by "O'brien, Tim" <to...@transolutions.net>.
Is there such a thing as conceptual dyslexia? I think I have it.. I left
out a parameter...
Redo those signatures:
public static byte[] encode( byte[] binaryData ) throws EncoderException
public static byte[] encode( byte[] binaryData,
boolean addNewline,
int errorLevel ) throws EncoderException
* Where errorLevel would be either Base64.IGNORE, Base64.WARN, or
Base64.EXCEPTION
--------
Tim O'Brien
> -----Original Message-----
> From: O'brien, Tim [mailto:tobrien@transolutions.net]
> Sent: Tuesday, February 04, 2003 12:08 AM
> To: Jakarta Commons Developers List
> Subject: [codec] base64 improved....
>
>
> An improved Base64 was added to a "binary" subpackage of
> codec. Martin
> Redington who is involved in xml-rpc submitted this version
> of the class as he has been actively contributing to the
> xml-rpc effort. This new version of the Base64 class
> improves performance of the decode and also is more
> compatible with RFC. There is a thread on rpc-dev to this effect:
>
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=rpc-dev@xml.apache.org&m
sgNo=713
So, [codec] now contains an implementation compatible with the xml-rpc
project, and the next step is to reconcile this version with the needs of
[httpclient].
Possible controversy here may be that the RFC was interpreted as requiring a
terminating newline. The RFC also mentions that a warning or exception
should be thrown when the encoder/decoder encounters invalid characters or
whitespace. My proposal is that we add a series of boolean flags, int
fields to the method signature to allow client projects to specify different
levels of RFC compliance.
public static byte[] encode( byte[] binaryData ) throws EncoderException
public static byte[] encode( byte[] binaryData, int errorLevel ) throws
EncoderException
Where errorLevel would be either Base64.IGNORE, Base64.WARN, or
Base64.EXCEPTION
--------
Tim O'Brien
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org