From oak-issues-return-71255-archive-asf-public=cust-asf.ponee.io@jackrabbit.apache.org Thu May 9 20:15:04 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5E5B7180649 for ; Thu, 9 May 2019 22:15:04 +0200 (CEST) Received: (qmail 345 invoked by uid 500); 9 May 2019 20:15:03 -0000 Mailing-List: contact oak-issues-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-issues@jackrabbit.apache.org Received: (qmail 331 invoked by uid 99); 9 May 2019 20:15:03 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 May 2019 20:15:03 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id F24E7E2BA9 for ; Thu, 9 May 2019 20:15:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 81D1225821 for ; Thu, 9 May 2019 20:15:01 +0000 (UTC) Date: Thu, 9 May 2019 20:15:01 +0000 (UTC) From: "Julian Reschke (JIRA)" To: oak-issues@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OAK-8275) Add NIO channel access to JCR binaries MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OAK-8275?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D168366= 66#comment-16836666 ]=20 Julian Reschke commented on OAK-8275: ------------------------------------- bq. I think it's not possible to implement a wrapper just base on InputStre= am mark/skip/reset semantics that will work for binaries of all sizes becau= se the initial marked position may get invalidated (see mark/reset JavaDoc = contract for InputStream). Could you please clarify that? > Add NIO channel access to JCR binaries > -------------------------------------- > > Key: OAK-8275 > URL: https://issues.apache.org/jira/browse/OAK-8275 > Project: Jackrabbit Oak > Issue Type: Improvement > Reporter: Henry Saginor > Priority: Major > > This is a follow up to the discussion started in OAK-8186. Currently JCR = binaries can only be accessed via InputStream. This is inefficient. It can = also be inadequate for some use cases. For example handling some Zip file f= ormats like deflate64 requires random access. > The proposal is to add API that returns SeekableByteChannel > Here is the new API I am proposing - > [https://github.com/hsaginor/jackrabbit/blob/createChannel/jackrabbit-ap= i/src/main/java/org/apache/jackrabbit/api/ChannelBinary.java] > [https://github.com/hsaginor/jackrabbit-oak/blob/createChannel2/oak-api/= src/main/java/org/apache/jackrabbit/oak/api/Blob.java] (see 2 added methods= ) > And all of the implementation changes - > [https://github.com/apache/jackrabbit-oak/compare/trunk...hsaginor:creat= eChannel2] > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)