mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter van der Velde" <Peter.vanderVe...@anachron.com>
Subject FileSystemView and isRandomAccessible function in the Apache FTP server
Date Thu, 11 Sep 2008 13:03:12 GMT
L.S.

I have implemented the FileSystemView as a virtual filesystem. Files are
stored unzipped in the database. On a file request the zip file is
created and streamed at the same time.

Therefore i dont want to allow random acces in the files (because they
don't really exist).

Implementing the isRandomAccessible function like this has no effect(at
least I think not):

public boolean isRandomAccessible() throws FtpException {

return false;

}

So i worked around it by extending the BufferedInputStream and implement
the markSupported as followed:

public boolean markSupported() {

return false;

}

This works for me but should the isRandomAccessible function work like I
think it should: don't allow an offset in the createInputStream funtion
of the FileObject?

public InputStream createInputStream(long offset) throws IOException {

 

With kind regards,

Peter van der Velde.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message