当前位置: 首页>>代码示例>>Java>>正文


Java SystemInfo类代码示例

本文整理汇总了Java中com.pi4j.system.SystemInfo的典型用法代码示例。如果您正苦于以下问题:Java SystemInfo类的具体用法?Java SystemInfo怎么用?Java SystemInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SystemInfo类属于com.pi4j.system包,在下文中一共展示了SystemInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: PlaySongHttpHandler

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public PlaySongHttpHandler()
{
    logger = Logger.getLogger(getClass().getName());
    try 
    {
        System.out.println("Hostname          :  " + NetworkInfo.getHostname());
        
        for (String ipAddress : NetworkInfo.getIPAddresses())
        {
            System.out.println("IP Addresses      :  " + ipAddress);
        }
    } 
    catch (Exception ex) 
    {
        Logger.getLogger(PlaySongHttpHandler.class.getName()).log(Level.SEVERE, null, ex);
    }
    
    String osName = SystemInfo.getOsName();
    System.out.println("OS Name           :  " + osName);
    if(osName.contains("Mac") ||
            osName.contains("Windows"))
    {
        System.out.println("The application is NOT running on Raspberry Pi.");
    }
    else
    {
        rtttlService = new RtttlService();
    }
}
 
开发者ID:onebeartoe,项目名称:media-players,代码行数:30,代码来源:PlaySongHttpHandler.java

示例2: getProcessor

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public String getProcessor() throws IOException, InterruptedException {
   return SystemInfo.getProcessor();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例3: getCodecMPG2Enabled

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public boolean getCodecMPG2Enabled() throws IOException, InterruptedException {
   return SystemInfo.getCodecMPG2Enabled();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例4: getCpuPart

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public String getCpuPart() throws IOException, InterruptedException {
   return SystemInfo.getCpuPart();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例5: getMemoryBuffers

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public long getMemoryBuffers() throws IOException, InterruptedException {
   return SystemInfo.getMemoryBuffers();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例6: isHardFloatAbi

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public boolean isHardFloatAbi() {
   return SystemInfo.isHardFloatAbi();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例7: getClockFrequencyHDMI

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public long getClockFrequencyHDMI() throws IOException, InterruptedException {
   return SystemInfo.getClockFrequencyHDMI();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例8: getCodecWVC1Enabled

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public boolean getCodecWVC1Enabled() throws IOException, InterruptedException {
   return SystemInfo.getCodecWVC1Enabled();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例9: getClockFrequencyISP

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public long getClockFrequencyISP() throws IOException, InterruptedException {
   return SystemInfo.getClockFrequencyISP();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例10: getCpuVoltage

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public float getCpuVoltage() throws IOException, InterruptedException, NumberFormatException {
   return SystemInfo.getCpuVoltage();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例11: getOsArch

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public String getOsArch() {
   return SystemInfo.getOsArch();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例12: getMemoryUsed

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public long getMemoryUsed() throws IOException, InterruptedException {
   return SystemInfo.getMemoryUsed();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例13: getCpuTemperature

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public float getCpuTemperature() throws IOException, InterruptedException, NumberFormatException {
   return SystemInfo.getCpuTemperature();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例14: getHardware

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public String getHardware() throws IOException, InterruptedException {
   return SystemInfo.getHardware();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java

示例15: getJavaVersion

import com.pi4j.system.SystemInfo; //导入依赖的package包/类
public String getJavaVersion() {
   return SystemInfo.getJavaVersion();
}
 
开发者ID:starksm64,项目名称:RaspberryPi,代码行数:4,代码来源:SystemInfoView.java


注:本文中的com.pi4j.system.SystemInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。