I read the source of VFS and in SftpFileObject class there is a TODO in doGetInputStream() methode: // TODO - Don't read the entire file into memory. Use the // stream-based methods on ChannelSftp once they work properly
My OutOfMemoryError is because it's reading the entire file into memory. So i want to modify VFS code but i don't see"stream-based" methodes in ChannelSftp class Can you help me please? zizou77 wrote: > > Hi, > > i would like to copy big big file (10G or 20G) with vfs. > So i use: > > FileObject file = flowRepository.resolveFile("src.txt"); > InputStream is = file.getContent().getInputStream(); > FileObject flow = flowRepository.resolveFile("cible.txt"); > OutputStream out = flow.getContent().getOutputStream(); > IOUtils.copy(is, out); > out.close(); > is.close(); > file.close(); > flow.close(); > > but i've got an OutOfMemoryError with IOUtils.copy. > > Help please! > > zizou > -- View this message in context: http://www.nabble.com/OutOfMemoryError-with-VFS-tf2369948.html#a6654827 Sent from the Commons - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]