lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark harwood <markharw...@yahoo.co.uk>
Subject Re: How do I know the memory size of my RAMDirectory ?
Date Tue, 09 May 2006 15:47:46 GMT
public int getRAMSize(RAMDirectory ramDir) throws
IOException
{
	String []segs=ramDir.list();
	int totalSize=0;
	for(int i=0;i<segs.length;i++)
	{
		totalSize+=ramDir.fileLength(segs[i]);
	}
	return totalSize;
}


		
___________________________________________________________ 
Switch an email account to Yahoo! Mail, you could win FIFA World Cup tickets. http://uk.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message