Examples of duplicate()


Examples of java.nio.ByteBuffer.duplicate()

                        numbytes += temp_numbytes;
                    }
                    message.position(0);
                    synchronized (recvQueue) {
                        recvQueue
                        .put(new Message(message.duplicate(), sid));
                    }
                    msgLength.position(0);
                }
            } catch (Exception e) {
                LOG.warn("Connection broken for id " + sid + ", my id = " +
View Full Code Here

Examples of java.nio.MappedByteBuffer.duplicate()

      public Block find(long pointer) {
        final int fileSize = numBlocksPerFile * (
            numRecordsPerBlock * UserEventIndex.ID_SIZE + UserEventIndex.Block.MetaData.SIZE);
        MappedByteBuffer byteBuffer = buffers.getUnchecked((int) (pointer / fileSize));
        ByteBuffer metaDataByteBuffer = byteBuffer.duplicate();
        metaDataByteBuffer.position((int) (pointer % fileSize));
        metaDataByteBuffer = metaDataByteBuffer.slice();
        ByteBuffer blockByteBuffer = byteBuffer.duplicate();
        blockByteBuffer.position((int) (pointer % fileSize) + Block.MetaData.SIZE);
        blockByteBuffer = blockByteBuffer.slice();
View Full Code Here

Examples of net.aufdemrand.denizen.scripts.ScriptEntrySet.Duplicate()

    }

    ScriptEntrySet getSetFor(String path) {
        ScriptEntrySet got = scriptsMap.get(path);
        if (got != null) {
            return got.Duplicate();
        }
        List<String> stringEntries = contents.getStringList(path);
        if (stringEntries == null || stringEntries.size() == 0) return null;
        List<ScriptEntry> entries = ScriptBuilder.buildScriptEntries(stringEntries, this, null, null);
        got = new ScriptEntrySet(entries);
View Full Code Here

Examples of net.aufdemrand.denizen.scripts.ScriptEntrySet.Duplicate()

        List<String> stringEntries = contents.getStringList(path);
        if (stringEntries == null || stringEntries.size() == 0) return null;
        List<ScriptEntry> entries = ScriptBuilder.buildScriptEntries(stringEntries, this, null, null);
        got = new ScriptEntrySet(entries);
        scriptsMap.put(path, got);
        return got.Duplicate();
    }

    private Map<String, ScriptEntrySet> scriptsMap = new HashMap<String, ScriptEntrySet>();

    /////////////
View Full Code Here

Examples of net.tinyos.nesc.dump.xml.WiringScanForwards.duplicate()

                ListIterator out = from.edges();
                WiringScan temp = null;

                while (out.hasNext()) {
                    Xwire e = (Xwire) out.next();
                    temp = from.duplicate();

                    if (temp.follow(e)) {
                        if (temp.node.ep instanceof Xinterface) {
                            Xinterface interfaceTo = (Xinterface) temp.node.ep;
                            saveInterfaceContainer(interfaceTo);
View Full Code Here

Examples of org.activeio.Packet.duplicate()

        if( isDisabled() ) {
            log.info("test disabled: "+getName());
            return;
        }
        Packet outboundPacket = new ByteArrayPacket("Hello World".getBytes());
        doSendReceive(outboundPacket.duplicate());
    }

    public void testPeerDisconnect() throws IOException, URISyntaxException, InterruptedException {
        if( isDisabled() ) {
            log.info("test disabled: "+getName());
View Full Code Here

Examples of org.activeio.packet.ByteArrayPacket.duplicate()

        if( isDisabled() ) {
            log.info("test disabled: "+getName());
            return;
        }
        Packet outboundPacket = new ByteArrayPacket("Hello World".getBytes());
        doSendReceive(outboundPacket.duplicate());
    }

    public void testPeerDisconnect() throws IOException, URISyntaxException, InterruptedException {
        if( isDisabled() ) {
            log.info("test disabled: "+getName());
View Full Code Here

Examples of org.apache.excalibur.threadcontext.ThreadContext.duplicate()

               throws ConfigurationException
       {
           ThreadContext threadContext = ThreadContext.getThreadContext();
           if( null != threadContext )
           {
               threadContext = threadContext.duplicate();
           }

           final Configuration[] groups = configuration.getChildren( "thread-group" );
           for( int i = 0; i < groups.length; i++ )
           {
View Full Code Here

Examples of org.apache.tomcat.util.buf.MessageBytes.duplicate()

        // Parse session Id
        parseSessionId(req, request);

        // URI decoding
        MessageBytes decodedURI = req.decodedURI();
        decodedURI.duplicate(req.requestURI());

        if (decodedURI.getType() == MessageBytes.T_BYTES) {
            // Remove any path parameters
            ByteChunk uriBB = decodedURI.getByteChunk();
            int semicolon = uriBB.indexOf(';', 0);
View Full Code Here

Examples of org.apache.tomcat.util.buf.MessageBytes.duplicate()

            req.serverName().setString(proxyName);
        }

        // Copy the raw URI to the decodedURI
        MessageBytes decodedURI = req.decodedURI();
        decodedURI.duplicate(req.requestURI());

        if (decodedURI.getType() == MessageBytes.T_BYTES) {
            // Parse the path parameters. This will:
            //   - strip out the path parameters
            //   - convert the decodedURI to bytes
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.