package kfs.kfsDbi;

import java.io.InputStream;

/**
 *
 * @author pavedrim
 */
public class kfsBlobData {
    private InputStream ind;
    private long length;
    
    public kfsBlobData(InputStream ind, long length) {
        this.ind = ind;
        this.length = length;
    }
    
    public long getLength() {
        return length;
    }

    public InputStream getInputStream() {
        return ind;
    }
    
}

@@ -29,16 +29,25 @@
 java.io.
+ByteArray
 InputStr
@@ -50,16 +50,175 @@
 tStream;
+%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.util.logging.Level;%0Aimport java.util.logging.Logger;
 %0A%0A/**%0A *
@@ -269,24 +269,26 @@
 bData %7B%0A    
+//
 private Inpu
@@ -316,25 +316,121 @@
 ate 
-long 
+byte%5B%5D bb;%0A    %0A    public kfsBlobData(byte %5B%5Ddata) %7B%0A        bb = data;//Arrays.copyOf(data, data.
 length
+)
 ;%0A    
+%7D
 %0A   
@@ -468,77 +468,559 @@
  ind
-, long length) %7B%0A        this.ind = ind;%0A        this.length = length
+) %7B%0A        ByteArrayOutputStream output = new ByteArrayOutputStream();%0A        byte %5B%5Dbuffer = new byte%5B1024%5D;%0A        int n;%0A        try %7B%0A            while (-1 != (n = ind.read(buffer))) %7B%0A                output.write(buffer, 0, n);%0A            %7D%0A        %7D catch (IOException ex) %7B%0A            Logger.getLogger(kfsBlobData.class.getName()).log(Level.SEVERE, //%0A                    %22Error in copy inputstream%22, ex);%0A        %7D%0A        bb = output.toByteArray();%0A    %7D%0A    %0A    public boolean isNull() %7B%0A        return (bb == null) %7C%7C (bb.length %3C= 0)
 ;%0A  
@@ -1043,12 +1043,11 @@
 lic 
-long
+int
  get
@@ -1072,16 +1072,19 @@
  return 
+bb.
 length;%0A
@@ -1151,22 +1151,102 @@
 urn 
-ind;%0A    %7D%0A    
+new ByteArrayInputStream(bb);%0A    %7D%0A    %0A    public byte%5B%5D getBytes()%7B%0A        return bb;%0A    %7D
 %0A%7D%0A

use bytes array as a buffer. Its need to multi access data and for SQLite inserting as a byte array