Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.5.2
    • Fix Version/s: Invalid
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Web Application on Tomcat 6.0.32

    • Estimated Complexity:
      Unknown

      Description

      Hi.
      I am using org.apache.cxf.io.CacheAndWriteOutputStream class and writeCacheTo method.
      As I know when message over 64kb, messese written to file system (Cache) and read.
      But when reading It get 1024byte from file and convert to new String like this

      IOUtils.newStringFromBytes(bytes, charsetName, 0, x)

      When multi-byte data (ex. Korean) is broken when reading from file system cache.
      Because data is consisted by multi byte charaters.

      How I can fix this.

        Activity

        Hide
        Daniel Kulp added a comment -


        Not really a bug. The CachedOutputStream and related stuff is byte oriented, not character, and thus must be treated as a complete binary blob.

        Show
        Daniel Kulp added a comment - Not really a bug. The CachedOutputStream and related stuff is byte oriented, not character, and thus must be treated as a complete binary blob.
        Hide
        Daniel Kulp added a comment -

        With any multi-byte charset you won't be able to reliably grab a small chunk of bytes and be able to convert that to a string. Your best bet is to do a new InputStreamReader(inputStream) to create a reader and then read a chunk of char's.

        Show
        Daniel Kulp added a comment - With any multi-byte charset you won't be able to reliably grab a small chunk of bytes and be able to convert that to a string. Your best bet is to do a new InputStreamReader(inputStream) to create a reader and then read a chunk of char's.

          People

          • Assignee:
            Daniel Kulp
            Reporter:
            Keunil Yoon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development