- showing database image into canvas in java
- blobCitizen=rsPersonalInfo.getBlob("citizen_image");
- public byte[] convertBlobToByteArray(Blob itStrm)
- {
- InputStream is;
- byte[] bytes=null;
- try {
- is = itStrm.getBinaryStream();
- bytes = new byte[(int)itStrm.length()];
- is.read(bytes);
- is.close();
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return bytes;
- }