![]() |
|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Deciphering a JavaDoc
I'm trying to use this class and need some guidance on the JavaDoc:
http://jezhumble.github.com/javasysm...moryStats.html I don't understand what to pass into the constructor. The whole purpose of the method is to get the FreeBytes and TotalBytes, what values do I assign to "free" and "total"? I've tried using the class and it seems whatever I use in the constructor gets passed back by getFreeBytes and getTotalBytes. My code looks something like this; Code:
public static long xxx () { long free = 0; long total = 0; MemoryStats memory = new MemoryStats(free, total); return memory.getFreeBytes(); } I'm obviously missing something fundamental.
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#2
|
|||
|
|||
That's a javadoc... not too terribly useful though!
If I had to guess... it's asking you to figure out the free and total, and it's just a "formatter" with it's toString method. |
#3
|
||||
|
||||
Agreed. Very poor docs, and the class itself doesn't look like it does anything useful beyond storing and returning the values you pass in to the constructor.
__________________
-- Greg |
#4
|
||||
|
||||
My Java dialect is a little poor these days
![]() Code:
JavaSysMon monitor = new JavaSysMon(); MemoryStats memory = monitor.physical(); int iFreeMem = memory.getFreeBytes(); int iTotalMem = memory.getTotalBytes();
__________________
SageTV 7.1.9 (headless/service) • JavaRE 1.6.0_37 • 2x FloppyDTV C/CI (DVB-C) (fw: 1.2.10 B43110) (CAM: Conax) • Win7 x64 • Intel E3-1245V2 3.4GHz • 16GB PC3-10600 ECC • ASUS P8C WS (Intel C216) • APC Back-UPS RS 800 • STP-HD300 Extender (fw: beta 20110506 0) - HDMI/SPDIF - Yamaha RX-V2700 - HDMI - Sony KDL-52X2000 |
#5
|
||||
|
||||
Thanks gents,
I actually have the code in there that creates a new JavaSysMon() but I didn't pick up the point about the physical() method. I'll look into this more when I get home. It's definately more than a formatter because I can get some of the other classes and methods to do their thing. Tom
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
#6
|
||||
|
||||
voidpt gets the cigar! I had to invoke .physical() to get the physical memory object and then use .getFreeBytes().
__________________
Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Download API Javadoc | phocker | SageTV Studio | 30 | 10-17-2008 07:45 PM |
Man have things changed. Need help deciphering everything now. | Big Jeff | General Discussion | 0 | 02-19-2007 11:27 AM |