Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • JDK version and platform:
      Java 1.6 for Win32

      Description

      Hi,

      I've run in a problem with streams. Here a quick & dirty example:

      try

      { XStream xs = new XStream(); int size = 250; byte[] buf = new byte[size]; for (int i = 0; i < size; i++) buf[i] = (byte) (i + 1); String original = new String(buf, "ISO-8859-1"); ByteArrayOutputStream os = new ByteArrayOutputStream(); xs.toXML(original, os); byte[] st = os.toByteArray(); InputStream is = new ByteArrayInputStream(st); String copy = (String) xs.fromXML(is); System.out.println(original.equals(copy)); // -> false !!!!! System.exit(0); }

      catch (Exception e)

      { e.printStackTrace(); }

      The line "System.out.println(original.equals(copy)); " prints out "false". I would expect "true".

        People

        • Assignee:
          Unassigned
          Reporter:
          D. Steinwedel
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: