From: Nick Burch Date: Fri, 10 Feb 2017 14:02:12 +0000 (+0000) Subject: Add a possible future TODO X-Git-Tag: REL_3_16_FINAL~103 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0474d20b7365ecee7a2e0bcb59ee7779d919618b;p=poi.git Add a possible future TODO git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1782472 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/poifs/nio/FileBackedDataSource.java b/src/java/org/apache/poi/poifs/nio/FileBackedDataSource.java index 32a8701fb8..69f3617910 100644 --- a/src/java/org/apache/poi/poifs/nio/FileBackedDataSource.java +++ b/src/java/org/apache/poi/poifs/nio/FileBackedDataSource.java @@ -88,6 +88,11 @@ public class FileBackedDataSource extends DataSource { throw new IndexOutOfBoundsException("Position " + position + " past the end of the file"); } + // TODO Could we do the read-only case with MapMode.PRIVATE instead? + // See https://docs.oracle.com/javase/7/docs/api/java/nio/channels/FileChannel.MapMode.html#PRIVATE + // Or should we have 3 modes instead of the current boolean - + // read-write, read-only, read-to-write-elsewhere? + // Do we read or map (for read/write)? ByteBuffer dst; if (writable) {