[jdom-interest] Question about element length

Joerg joerg at freiheit.com
Wed Aug 23 04:50:40 PDT 2000


We had problems, transferring long Java Strings via RMI. There is a 64k restriction
in JDK versions prior to JDK1.3.

Ilja Preuß wrote:

> > Regardless, I don't believe Java has a String length restriction.  I
> > just wrote a sample program that constructs a 1,000,000 character
> > string, and it worked fine.  Now I seem to recall method bodies have a
> > 64K restriction; maybe you're thinking of that.
>
> Well, in fact the length of a String is stored as an int, so the maximum
> length would be 2.147.483.647 chars, that's a 4 terabyte restriction (as a
> char is two bytes). Of course this will never be a problem, in the same way
> the Y2K never was... ;-)
>
> Regards, Ilja
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



--
<?xml version="1.0" standalone="no" encoding="ISO-8859-1"?>
<businesscard>
  <bookmarks>
    <bookmark> http://www.google.com </bookmark>
    <bookmark> http://www.gnu.org </bookmark>
    <bookmark> http://java.apache.org </bookmark>
    <bookmark> http://www.w3.org </bookmark>
    <bookmark> http://www-db.stanford.edu/lore </bookmark>
  </bookmarks>
  <sender>
    <firstname> Jörg </firstname>
    <name> Kirchhof </name>
    <title> Dipl.-Ing. </title>
    <email> joerg at freiheit.com </email>
    <phone> +49-40-890584-14 </phone>
  </sender>
  <company>
    <name> freiheit.com Technologieberatung GmbH </name>
    <address> Theodorstraße 42-90 </address>
    <zip> 22761 </zip>
    <city> Hamburg </city>
    <country> Germany </country>
    <phone> +49-40-890584-0 </phone>
    <fax> +49-40-890584-20 </fax>
    <www> http://www.freiheit.com </www>
  </company>
</businesscard>





More information about the jdom-interest mailing list