Convert File To Byte Array Using Java

This is a nifty helper method to convert a File object into a byte array. I got this method in Java FAQ. /** * Returns the contents of the file in a byte array * @param file File this method should read * @return byte[] Returns a byte[] array of the contents of the file */ public static byte[]... 

Source:  Tech Tips Tricks

Disclaimer: PinoyBlogoSphere.com(PBS) claims no credit for any content(posts, articles, texts, images, videos) featured on this site unless otherwise noted. All contents are copyright to their owners/sources. PBS is in no way responsible for or has control of the content of any external web site links. Information on this site may contain errors or inaccuracies; we do not make warranty as to the correctness or reliability of the site’s content. If you own rights to any of the content, and do not wish them to appear on this site, please contact us via e-mail and they will be removed.
Your Ad Here

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

  . .