Author: nick
Date: Thu Sep 11 12:07:22 2014
New Revision: 1624266
URL: http://svn.apache.org/r1624266
Log:
More from Daniel Bonniot from bug #56956 - Make the FileChannel default
read-only too, more in keeping with 3.10 behaviour
Modified:
poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
Modified:
poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java?rev=1624266&r1=1624265&r2=1624266&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
(original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
Thu Sep 11 12:07:22 2014
@@ -167,20 +167,20 @@ public class NPOIFSFileSystem extends Bl
/**
* <p>Creates a POIFSFileSystem from an open <tt>FileChannel</tt>. This
uses
* less memory than creating from an <tt>InputStream</tt>. The stream will
- * be used in read-write mode.</p>
+ * be used in read-only mode.</p>
*
* <p>Note that with this constructor, you will need to call {@link
#close()}
* when you're done to have the underlying Channel closed, as the channel
is
* kept open during normal operation to read the data out.</p>
*
- * @param channel the FileChannel from which to read and write the data
+ * @param channel the FileChannel from which to read the data
*
* @exception IOException on errors reading, or on invalid data
*/
public NPOIFSFileSystem(FileChannel channel)
throws IOException
{
- this(channel, null, false, false);
+ this(channel, true);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]