title: Java -Check if file is in print Queue / In Use
body: <p>OK I have a program that:</p>
  
  <ol>
  <li>Creates a temporary file based on a
  users input</li>
  <li>Prints the File(Optional)</li>
  <li>Deletes the File (Optional)</li>
  </ol>
  
  <p>My problem sits between stages 2&amp;3, I need to wait for the file to finish printing until I can delete it. </p>
  
  <p>FYI: the printing will take 5-10 minutes (large file to spool on an old computer)</p>
  
  <p>So I need to from Java be able to to check if:</p>
  
  <ul>
  <li><p>the defualt print queue is empty</p></li>
  <li><p>the file is in use (note:   File.canWrite() returns true, when printing)</p></li>
  </ul>