results from String.getBytes(s, "UnicodeBig") are in-consistent

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 1.3.0
    • Affects Version/s: 1.2.0, 1.3.0
    • Component/s: core-libs
    • kestrel
    • generic, sparc
    • generic, solaris_2.6



      Name: dbT83986 Date: 03/15/99


      When String's getBytes() method is called repeatedly
      with the same string, the byte arrary returned by
      this method is different on subsequent calls.

      Given:

         String s = new String("a");
         String encoding = "UnicodeBig";
         byte [] b = null;

      When the following is execute, the length of array b is 4
      (the first two bytes contain the FE and FF):

         b = s.getBytes(encoding);
         System.out.println("LEN = " + b.length);

      If the above two lines are re-executed, the length of
      array b is two (the FE and FF bytes are NOT present):

         b = s.getBytes(encoding);
         System.out.println("LEN = " + b.length);
      (Review ID: 55461)
      ======================================================================

            Assignee:
            Mark Reinhold
            Reporter:
            Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: