Package java.io

Examples of java.io.DataInputStream.readLong()


                        args[i]=Util.objectFromStream(in);
                }
                return new MethodCall(id, args);
            }
            else if(type == VALUE) {
                long expiration_time=in.readLong();
                Object obj=Util.objectFromStream(in);
                return new Cache.Value(obj, expiration_time);
            }
            else
                return Util.objectFromStream(in);
View Full Code Here


        InputStream in = socket.getInputStream();
        DataInputStream dis = new DataInputStream(in);

        String fname = IOUtils.readString(dis);
        String dirPath = IOUtils.readString(dis);
        long len = dis.readLong();
        boolean append = dis.readBoolean();
        boolean ackRequired = dis.readBoolean();
        boolean hasAdditionalHeader = dis.readBoolean();
        if(hasAdditionalHeader) {
            readAdditionalHeader(dis, fname, dirPath, len, append, ackRequired);
View Full Code Here

                LOG.debug("Sent a file '" + file.getAbsolutePath() + "' of " + nbytes
                        + " bytes to " + dstSockAddr.toString() + " in " + sw.toString());
            }

            if(sync) {// receive ack in sync mode
                long remoteRecieved = din.readLong();
                if(remoteRecieved != xferBytes) {
                    throw new IllegalStateException("Sent " + xferBytes
                            + " bytes, but remote node received " + remoteRecieved + " bytes");
                }
            }
View Full Code Here

                LOG.debug("Sent a file data '" + fileName + "' of " + nbytes + " bytes to "
                        + dstSockAddr.toString() + " in " + sw.toString());
            }

            if(sync) {// receive ack in sync mode
                long remoteRecieved = din.readLong();
                if(remoteRecieved != nbytes) {
                    throw new IllegalStateException("Sent " + nbytes
                            + " bytes, but remote node received " + remoteRecieved + " bytes");
                }
            }
View Full Code Here

                for(int i = 0; i < ptrslen; i++) {
                    ptrs[i] = VariableByteCodec.decodeLong(in);
                }
                // Read in the links if current node is a leaf
                if(ph.getStatus() == LEAF) {
                    this._prev = in.readLong();
                    this._next = in.readLong();
                }
                this.currentDataLen = v.getLength();
                this.loaded = true;
            }
View Full Code Here

                    ptrs[i] = VariableByteCodec.decodeLong(in);
                }
                // Read in the links if current node is a leaf
                if(ph.getStatus() == LEAF) {
                    this._prev = in.readLong();
                    this._next = in.readLong();
                }
                this.currentDataLen = v.getLength();
                this.loaded = true;
            }
        }
View Full Code Here

            //  Read in the size of the video
            int w = in.readInt();
            int h = in.readInt();

            //  Read in the duration of the video (in nanos)
            duration = in.readLong();

            //  Set the preferred size
            mic.setImageSize( new Dimension(w,h) );
        }
       
View Full Code Here

                while(true) {
                    //  Get frame length
                    long length = in.readLong();

                    //  Get frame delay
                    long nanos = in.readLong();

                    //  Get frame image
                    byte[] b = new byte[(int)length];
                    in.readFully(b,0,(int)length);
                    ImageIcon icon = new ImageIcon(b);
View Full Code Here

            try {
                //  Read in the width/height/duration
                in.readInt();
                in.readInt();
                in.readLong();

                //  Read in the frames
                while(true) {
                    //  Read in the length of the frame
                    long length = in.readLong();
View Full Code Here

                in.readLong();

                //  Read in the frames
                while(true) {
                    //  Read in the length of the frame
                    long length = in.readLong();

                    //  Read in the delay for the frame
                    long nanos = in.readLong();

                    //  Read in the frame image
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.