Examples of capacity()


Examples of net.gleamynode.netty.buffer.ChannelBuffer.capacity()

                        }
                    }
                    if (result.bytesProduced() > 0) {
                        outNetBuf.flip();
                        msg = ChannelBuffers.buffer(outNetBuf.remaining());
                        msg.writeBytes(outNetBuf.array(), 0, msg.capacity());
                        outNetBuf.clear();

                        if (pendingWrite.outAppBuf.hasRemaining()) {
                            // pendingWrite's future shouldn't be notified if
                            // only partial data is written.
View Full Code Here

Examples of net.openhft.koloboke.collect.impl.hash.SeparateKVByteIntDHash.capacity()

        ByteIntMap map;
        SeparateKVByteIntDHash asDHash;
        for (int i = 0; ; i++) {
            map = factory.newMutableMap(i);
            asDHash = (SeparateKVByteIntDHash) map;
            if (asDHash.capacity() > 128) {
                break;
            }
        }

        int capacity = asDHash.capacity();
View Full Code Here

Examples of net.rubyeye.xmemcached.buffer.IoBuffer.capacity()

  public void testEmptyBuffer() {
    IoBuffer emptyBuffer = this.allocator.allocate(0);

    assertNotNull(emptyBuffer);
    assertEquals(0, emptyBuffer.capacity());
    assertEquals(0, emptyBuffer.position());
    assertEquals(0, emptyBuffer.limit());

    try {
      emptyBuffer.put((byte) 0);
View Full Code Here

Examples of net.sf.cindy.Buffer.capacity()

            buffer.put(b);
            assertEquals(b.length, buffer.position());
            buffer.flip();
            assertEquals(0, buffer.position());
            assertEquals(b.length, buffer.limit());
            assertEquals(b.length, buffer.capacity());
            assertEquals(b.length, buffer.remaining());
            assertTrue(buffer.hasRemaining());
            assertEquals(buffer.asByteBuffer(), ByteBuffer.wrap(b));

            random.nextBytes(b);
View Full Code Here

Examples of net.sf.sahi.util.BrowserType.capacity()

      BrowserType browserType = browserLoader.getBrowserType(request);
      Session session = request.session();
        String suitePath = request.getParameter("suite");
        String base = request.getParameter("base");
        boolean isSingleSession = "true".equals(request.getParameter("useSingleSession"));
        final int threads = getThreads(request.getParameter("threads"), browserType.capacity());

        // launches browser with pre configured browser settings
        if(browserType != null){
          suite = prepareSuite(suitePath, base, browserType.path(), session.id(), browserType.options(),
          browserType.processName(), (""+threads), browserType.useSystemProxy(), isSingleSession, request);
View Full Code Here

Examples of net.tomp2p.storage.AlternativeCompositeByteBuf.capacity()

    cbuf.readBytes(me);
    cbuf.readByte();

    System.err.println("reader: " + cbuf.readerIndex());
    System.err.println("writer: " + cbuf.writerIndex());
    System.err.println("capacity: " + cbuf.capacity());
    // see https://github.com/netty/netty/issues/1976
    cbuf.discardSomeReadBytes();
  }

  /**
 
View Full Code Here

Examples of org.activeio.Packet.capacity()

        packet.position(5);
        packet.limit(95);
        Packet packet2 = packet.slice();
       
        assertEquals(0, packet2.position());
        assertEquals(90, packet2.capacity());
        assertEquals(90, packet2.limit());
    }

    public void testWriteAndReadByte() {
       
View Full Code Here

Examples of org.apache.directmemory.memory.buffer.MemoryBuffer.capacity()

        allocator.setSizeRatioThreshold( 10 );

        MemoryBuffer bf1 = allocator.allocate( 180 );
        Assert.assertEquals( 180, bf1.maxCapacity() );
        Assert.assertEquals( 180, bf1.capacity() );

        MemoryBuffer bf2 = allocator.allocate( 10 );
        Assert.assertEquals( 20, bf2.maxCapacity() );
        Assert.assertEquals( 10, bf2.capacity() );
View Full Code Here

Examples of org.apache.directory.api.util.ByteBuffer.capacity()

{
    @Test
    public void testByteBufferGrowth()
    {
        ByteBuffer buf = new ByteBuffer();
        assertEquals( 10, buf.capacity() );

        for ( int ii = 0; ii < 20; ii++ )
        {
            buf.append( ii );
            assertEquals( ii, buf.get( ii ) );
View Full Code Here

Examples of org.apache.directory.shared.util.ByteBuffer.capacity()

{
    @Test
    public void testByteBufferGrowth()
    {
        ByteBuffer buf = new ByteBuffer();
        assertEquals(10, buf.capacity());
       
        for ( int ii = 0; ii < 20; ii++ )
        {
            buf.append( ii );
            assertEquals(ii, buf.get(ii));
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.