-1

I want to store and retrieving image in db4o with java I have read some topic about store image in db4o but i can not do I have db ;

class WaterFish {
     String fishname;
      String biology;
     String information;
     Fish_Image image ;

      }
class Fish_Image {
     Blod image;
     public Fish_Image(Blod image){
        this.image = image;
    }
    public Blod getFishImage(){
       return image;
    }

So, how I can store and retrieving image with structure like that. Give me some detail example with code.

vels4j
  • 11,208
  • 5
  • 38
  • 63
duythanhcn
  • 31
  • 1
  • 3

1 Answers1

0

You could use Blobs to store images in object container. See the documentation for using Blobs.

Db4o Blob Implementation gives you an example. Hope you are using

vels4j
  • 11,208
  • 5
  • 38
  • 63
  • code in 2 site you give me have 2 folder : blods/in and blods/out inFolder ( "blobs\in\") is used as a location of existing files, which are to be stored into db4o, and outFolder ( "blobs\out\") will be the place for images, retrieved from the database. when i run my program, images be stored onto db40 but it copy images on blods folder not blods/out folder i dont know why? and i dont want my program cropy images in blods/in folder and how i solve this problem ? – duythanhcn Apr 10 '14 at 09:21