title: Ways to convert a PDF file into byte array..(for flushing out using outputstream())
body: <ul>
  <li>Is there any other way to convert a file (PDF) into byte array other than using <strong>FileInputStream</strong> or <strong>toByteArray(InputStream input)</strong>..</li>
  <li>Is there any method to convert it directly. I found <strong>Files.readAllBytes</strong> in java.nio.file.* package but it gives <strong>ClassNotFoundException</strong> in my RAD. I am having Java 8 JDK in my system. </li>
  <li>Is java.nio.file.* package not available in Java 8?</li>
  <li>My requirement is that i should not to <strong>stream</strong> the file using InputStram.</li>
  </ul>