[jcifs] java.lang.OutOfMemoryError: Java heap space

Edwin Portscher eportscher at meridianemr.com
Thu Sep 6 18:57:22 GMT 2007


Thanks,

Quick question in largelistfiles

public LargeListFiles() {
        super("*", 0xFFFF);

what is 0xFFFF specifying?

ed

-----Original Message-----
From: Jake Goulding [mailto:goulding at vivisimo.com] 
Sent: Thursday, September 06, 2007 2:28 PM
To: Edwin Portscher
Cc: jcifs at lists.samba.org
Subject: Re: [jcifs] java.lang.OutOfMemoryError: Java heap space

Edwin:

I had the same problem. Mike suggested implementing a SmbFileFilter that
you can use while listing the directory. It will be passed each file as
the server reads it. returning false will cause it to not be added to
the result list that listFiles() returns. The only trick is you have to
be quick while processing each file, or else you can cause network timeouts.

Edwin Portscher wrote:
> Hello all,
> 
>  
> 
> Question when doing a SmbFile[] = smb.listfiles();
> 
>  
> 
> I am getting java.lang.OutOfMemoryError: Java heap space when the
> directory contains a lot of files
> 
>  
> 
> Any ideas?
> 
>  
> 
> Thanks
> 
> ed
> 



More information about the jcifs mailing list