commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zizou77 <pa...@laposte.net>
Subject Re: OutOfMemoryError with VFS
Date Thu, 05 Oct 2006 08:47:03 GMT

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: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message