Examples of buffer()


Examples of org.jgroups.util.ByteArrayDataOutputStream.buffer()

            if(msg.getSrc() == null)
                msg.setSrc(local_addr);
            ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(128);
            msg.writeTo(out);
            for(int i=bind_port; i <= bind_port+port_range; i++) {
                DatagramPacket packet=new DatagramPacket(out.buffer(), 0, out.position(), dest_addr, i);
                sock.send(packet);
            }
        }
        catch(Exception ex) {
            log.error("failed sending discovery request", ex);
View Full Code Here

Examples of org.jgroups.util.ByteArrayDataOutputStream.buffer()

            num_msgs_sent++;
            num_bytes_sent+=dos.position();
        }
        List<RouterStub> stubs = stubManager.getStubs();
        if(dest == null)
            tunnel_policy.sendToAllMembers(stubs, group, dos.buffer(), 0, dos.position());
        else
            tunnel_policy.sendToSingleMember(stubs, group, dest, dos.buffer(), 0, dos.position());
    }

View Full Code Here

Examples of org.jgroups.util.ByteArrayDataOutputStream.buffer()

        }
        List<RouterStub> stubs = stubManager.getStubs();
        if(dest == null)
            tunnel_policy.sendToAllMembers(stubs, group, dos.buffer(), 0, dos.position());
        else
            tunnel_policy.sendToSingleMember(stubs, group, dest, dos.buffer(), 0, dos.position());
    }


    public void sendMulticast(AsciiString cluster_name, byte[] data, int offset, int length) throws Exception {
        throw new UnsupportedOperationException("sendMulticast() should not get called on TUNNEL");
View Full Code Here

Examples of org.voltdb.messaging.FastDeserializer.buffer()

            ByteString paramData = request.getParams(i);
            if (paramData != null && paramData.isEmpty() == false) {
                final FastDeserializer fds = new FastDeserializer(paramData.asReadOnlyByteBuffer());
                if (trace.val)
                    LOG.trace(String.format("Txn #%d paramData[%d] => %s",
                              txn_id, i, fds.buffer()));
                try {
                    parameterSets[i] = fds.readObject(ParameterSet.class);
                } catch (Exception ex) {
                    String msg = String.format("Failed to deserialize ParameterSet[%d] for txn #%d TransactionRequest", i, txn_id);
                    throw new ServerFaultException(msg, ex, txn_id);
View Full Code Here

Examples of org.vorbis.jcraft.jogg.Buffer.buffer()

        }

        op.packet_base = new byte[opb.bytes()];
        op.packet = 0;
        op.bytes = opb.bytes();
        System.arraycopy(opb.buffer(), 0, op.packet_base, 0, op.bytes);
        op.b_o_s = 0;
        op.e_o_s = 0;
        op.granulepos = 0;
        return 0;
    }
View Full Code Here

Examples of org.vorbis.jcraft.jogg.SyncState.buffer()

            // (which is guaranteed to be small and only contain the Vorbis
            // stream initial header) We need the first page to get the stream
            // serialno.

            // submit a 4k block to libvorbis' Ogg layer
            int index = oy.buffer(4096);
            buffer = oy.data;
            try {
                bytes = input.read(buffer, index, 4096);
            } catch (Exception ex) {
                LOG.log(Level.SEVERE, null, ex);
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.