title: Get Windows Charging Status in Java
body: <p>I am trying to tell weather or not my windows laptop is charging. I want it to check, and return either a 1 or true if it is charging or a 0 or false if it is not. I am following the instructions at <a href="https://stackoverflow.com/questions/3434719/how-to-get-the-remaining-battery-life-in-a-windows-system">How to get the remaining battery life in a Windows system?</a>, But I can't figure out how to parse the answer and get the charging status. Does anyone have a suggestion?</p>
  
  <p>Edit: I want to be able to type something like 
  boolean battery = getBattery();
  and have it return true or false </p>