Posts

Showing posts from July, 2015

Kalculate next vesion

Image
  Upcoming version of Kalculate After a big launching of kalculate accounting software company is ready to release first update. Features:  Fixed the issue of 32 bit installation.. User can type and work with their regional language.. Logo in pdf report... Fix the issue of unresponsive screens.. And the user can manage the logo should be displayed on report or not, and also set the alignment of logo.

store and retrieve image data to any database in java

We will insert image data into database in byte[] format Here is a piece of code to convert image data into byte[]:  // image file File file = new File("images/extjsfirstlook.jpg");  // create byte with specified size byte[] bFile = new byte[(int) file.length()]; try {  FileInputStream fileInputStream = new FileInputStream(file);   // bFile is initialized fileInputStream.read(bFile); fileInputStream.close(); } catch (Exception e) { e.printStackTrace(); } //now you can store bFile in database       Here is a piece of code to convert byte[] data into image: try {     // create output stream with a file path where you want to store  // your image on your drive FileOutputStream fos = FileOutputStream("images/output.jpg"); // it will write data byte data into the file specified fos.write(book.getImage()); fos.close() } catch (Exception e) { e.printStackTrace(); } // now you can use your image