totalmemoryexoloreritem.java
来自「一个agent 工具包,可以开发移动设备应用,考虑了安全措施」· Java 代码 · 共 26 行
JAVA
26 行
package SOMA.utility;
import java.io.*;
import java.util.*;
/** Restituisce la <B>MEMORIA TOTALE</B>.
*
* @author Livio Profiri
*/
public class TotalMemoryExolorerItem extends SOMA.explorer.ExplorerItem
{
public TotalMemoryExolorerItem()
{
super( "Returns the TOTAL amount of memory in the Java Virtual Machine." );
}
public Object Execute( Collection Parameters, PrintStream out )
{
long mem = Runtime.getRuntime().totalMemory();
out.println( "The TOTAL memory is: " + mem );
return new Long( mem );
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?