More from Daniel Bonniot from bug #56956 - Make the FileChannel default read-only too, more in keeping with 3.10 behaviour
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1624266 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ba861897ed
commit
21046dc43a
@ -167,20 +167,20 @@ public class NPOIFSFileSystem extends BlockStore
|
|||||||
/**
|
/**
|
||||||
* <p>Creates a POIFSFileSystem from an open <tt>FileChannel</tt>. This uses
|
* <p>Creates a POIFSFileSystem from an open <tt>FileChannel</tt>. This uses
|
||||||
* less memory than creating from an <tt>InputStream</tt>. The stream will
|
* 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()}
|
* <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
|
* 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>
|
* 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
|
* @exception IOException on errors reading, or on invalid data
|
||||||
*/
|
*/
|
||||||
public NPOIFSFileSystem(FileChannel channel)
|
public NPOIFSFileSystem(FileChannel channel)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
this(channel, null, false, false);
|
this(channel, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user