Package com.db4o.foundation.network

Examples of com.db4o.foundation.network.Socket4


            BlobImpl blobImpl = this.serverGetBlobImpl();
            if (blobImpl != null) {
                blobImpl.setTrans(transaction());
                File file = blobImpl.serverFile(null, false);
                int length = (int) file.length();
                Socket4 sock = serverThread.socket();
                Msg.LENGTH.getWriterForInt(transaction(), length).write(stream, sock);
                FileInputStream fin = new FileInputStream(file);
                copy(fin,sock,false);
                sock.flush();
                Msg.OK.write(stream, sock);
            }
        } catch (Exception e) {
          serverThread.write(Msg.ERROR);
        }
View Full Code Here


            ObjectContainerBase stream = stream();
            BlobImpl blobImpl = this.serverGetBlobImpl();
            if (blobImpl != null) {
                blobImpl.setTrans(transaction());
                File file = blobImpl.serverFile(null, true);
                Socket4 sock = serverThread.socket();
                Msg.OK.write(stream, sock);
                FileOutputStream fout = new FileOutputStream(file);
                copy(sock,fout,blobImpl.getLength(),false);
                Msg.OK.write(stream, sock);
            }
View Full Code Here

TOP

Related Classes of com.db4o.foundation.network.Socket4

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.