mrpdaemon / encfs-java

encfs-java is a Java library for accessing data in EncFS volumes
GNU Lesser General Public License v3.0
42 stars 15 forks source link

EncFSFileInputStream should extend InputStream #6

Closed mrpdaemon closed 12 years ago

mrpdaemon commented 12 years ago

Instead of extending FileInputStream, if we extend InputStream then we could implement read(byte[], int, int) without the recustion problems we've seen in Issue #3.

aefo commented 12 years ago

Perhaps EncFSFileInputStream should just extend java.io.InputStream and then for it to contain the FileInputStream internally. Then rather than needing to call super.XXXX it can just call innerFileInputStream.XXXX and there won't be an inheritance problem. Then if we need to change the way files are read in the future it won't change the public inheritance EncFSFileInputStream . (e.g. Perhaps in the future we want to load from urls, rather than just local files, etc.)

mrpdaemon commented 12 years ago

That sounds pretty good, I'll update the issue title :)

mrpdaemon commented 12 years ago

This refactoring is done.