]> source.dussan.org Git - poi.git/commitdiff
Add a possible future TODO
authorNick Burch <nick@apache.org>
Fri, 10 Feb 2017 14:02:12 +0000 (14:02 +0000)
committerNick Burch <nick@apache.org>
Fri, 10 Feb 2017 14:02:12 +0000 (14:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1782472 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/poifs/nio/FileBackedDataSource.java

index 32a8701fb8ef2d8312929f0e91c639227f5fd0d1..69f361791014d512fc87f8c3ded152903758c219 100644 (file)
@@ -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) {