[jdom-interest] OT - Failing early on maxLength violations

J. McConnell jdotmc at gmail.com
Wed Dec 14 08:32:53 PST 2005

On 12/14/05, Michael Kay <mike at saxonica.com> wrote:
> > There is a business rule in place on the maximum size of the image,
> I can imagine a business rule that expresses a maximum size as say 12cm x
> 8cm, but a restriction on the size in bytes of the compressed image is
> surely a technical rule rather than a business rule, imposed for technical
> purposes rather than business purposes.

You're absolutely right, the rule is on dimensions.  Given the maximum
dimensions, I can come up with a maximum file size.  Perhaps I'll
decide not to go this route, but I figure if I can catch this early,
before decoding the binary data and creating an object for the image,
I might as well.

- J.

More information about the jdom-interest mailing list