All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.rmuhamedgaliev.service.OS.impl.OSInformationImpl Maven / Gradle / Ivy

Go to download

Library for getting information about local computer implemented on java. Used 2 Linux commands, other implemented on Java.

There is a newer version: 0.0.0.4
Show newest version
package io.github.rmuhamedgaliev.service.OS.impl;

import io.github.rmuhamedgaliev.service.OS.OSInformation;
import org.springframework.stereotype.Service;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Developer: Muhamedgaliev Rinat
 * Date: 5/1/13
 * Time: 12:34 PM
 */
@Service(value = "osInformation")
public class OSInformationImpl implements OSInformation {

    @Override
    public String getOSVersion() {
        return System.getProperty("os.version");
    }

    @Override
    public String getOSArch() {
        return System.getProperty("os.arch");
    }

    @Override
    public String getOSDate() {
        DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        Date date = new Date();
        return dateFormat.format(date);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy