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

Edwin Portscher eportscher at meridianemr.com
Thu Sep 6 19:07:43 GMT 2007


Looking at the api there is no method to pull say the first 100 files alphabetically
It either all or nothing

ed

-----Original Message-----
From: Jake Goulding [mailto:goulding at vivisimo.com] 
Sent: Thursday, September 06, 2007 3:02 PM
To: Edwin Portscher
Cc: JCIFS List
Subject: Re: [jcifs] java.lang.OutOfMemoryError: Java heap space

Not sure, according to the API [1], they are some kind of attributes.
For my case, I wanted all the files, so I directly implemented
SmbFileFilter, and did operations simply based on the names.

-Jake

[1] http://jcifs.samba.org/src/docs/api/jcifs/smb/DosFileFilter.html


Edwin Portscher wrote:
> 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