Paul Sandoz wrote:
>> If they are reported to RestrictedCharacterContentHandler, I don't
>> think they should be reported as char[] as this doubles the memory
>> requirements for the buffer. In some environments, this may be an
>> issue. IMO it is better to report them as byte[] and perhaps offer
>> some utility method to convert byte[] to char[], but leave this
>> decision to the app.
>>
>
> The SAX parser needs to keep a char buffer around anyway for strings
> (identifing and non-identifying) so this buffer can be reused in this case.
>
> This interface is mirroring the PrimitiveTypeContentHandler interface in
> that artifacts are returned in the corresponding primitive type in Java
> to be of immediate use.
>
> But you make a good point, IMHO it seems the best place to use byte[]
> would be for the more generic AlphabetAndAlgorithmContentHandler.
> Clients wishing to avail of their own optimizations in processing can
> use the AlphabetAndAlgorithmContentHandler which always returns bytes.
>
Also "hexadecimal" is not a restricted alphabet and is specified as a
encoding algorithm but still produces characters so it belongs to the
RestrictedCharacterContentHandler interface.
Paul.
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_fi.dev.java.net
For additional commands, e-mail: dev-help_at_fi.dev.java.net