Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6818737

Provide NIO channel access for zip/jar entry

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 7
    • core-libs

      A DESCRIPTION OF THE REQUEST :
      We have
          InputStream getInputStream(ZipEntry entry)
      in class ZipFile, but not
          Channel getChannel(ZipEntry entry)



      JUSTIFICATION :
      All the good reasons, we have for the java.nio package as a whole, especially performance gain.
      Needed to implement Class#getChannel().

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Connect to a JNI-accessed direct ByteBuffer.

      CUSTOMER SUBMITTED WORKAROUND :
      Channels.getChannel(zipFile.getInputStream(ZipEntry entry));
      ... but this channel is very slow, because of underlying BufferedInputStream.

            sherman Xueming Shen
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: