Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] DirectNIOBuffer(File)

I am using a DirectNIOBuffer constructed with a File to implement sending a
memory mapped file.  The code for the constructor is:

    public DirectNIOBuffer(File file) throws IOException
    {
        super(READONLY,NON_VOLATILE);
        FileInputStream fis = new FileInputStream(file);
        FileChannel fc = fis.getChannel();
        _buf = fc.map(FileChannel.MapMode.READ_ONLY, 0, file.length());
        setGetIndex(0);
        setPutIndex((int)file.length());
        _access=IMMUTABLE;
    }

Where is the FileChannel closed?


--
View this message in context: http://jetty.4.n6.nabble.com/DirectNIOBuffer-File-tp4375225p4375225.html
Sent from the Jetty User mailing list archive at Nabble.com.


Back to the top