Examples of fill()


Examples of org.apache.harmony.awt.nativebridge.Int8Pointer.fill()

     */
    static KeyInfo translateEvent(X11.XKeyEvent event) {
        KeyInfo res = new KeyInfo();
        int nBytes = 255;
        Int8Pointer buffer = bridge.createInt8Pointer(nBytes, false);
        buffer.fill((byte)0, nBytes);
        CLongPointer keySymPtr = bridge.createCLongPointer(1, false);

        nBytes = x11.XLookupString(event, buffer, nBytes, keySymPtr, null);

        if (nBytes > 0) {
View Full Code Here

Examples of org.apache.http.impl.nio.reactor.SessionInputBuffer.fill()

    public void testDecodingFromSessionBuffer() throws Exception {
        ReadableByteChannel channel = new ReadableByteChannelMockup(
                new String[] {"stuff;", "more stuff"}, "US-ASCII");
       
        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256);
        inbuf.fill(channel);
       
        assertEquals(6, inbuf.length());
       
        IdentityDecoder decoder = new IdentityDecoder(channel, inbuf);
       
View Full Code Here

Examples of org.apache.http.impl.nio.reactor.SessionInputBufferImpl.fill()

        HttpParams params = new BasicHttpParams();
       
        SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params);
        HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
       
        inbuf.fill(channel);
       
        assertEquals(6, inbuf.length());
       
        IdentityDecoder decoder = new IdentityDecoder(channel, inbuf, metrics);
       
View Full Code Here

Examples of org.apache.http.nio.impl.reactor.SessionInputBuffer.fill()

    public void testDecodingFromSessionBuffer1() throws Exception {
        ReadableByteChannel channel = new ReadableByteChannelMockup(
                new String[] {"stuff;", "more stuff"}, "US-ASCII");
       
        SessionInputBuffer inbuf = new SessionInputBuffer(1024, 256);
        inbuf.fill(channel);
       
        assertEquals(6, inbuf.length());
       
        LengthDelimitedDecoder decoder = new LengthDelimitedDecoder(channel, inbuf, 16);
       
View Full Code Here

Examples of org.apache.http.nio.reactor.SessionInputBuffer.fill()

        HttpParams params = new BasicHttpParams();
        SessionInputBuffer inbuf = new SessionInputBufferImpl(16, 16, params);
       
        ReadableByteChannel channel = newChannel("One\r\nTwo\r\nThree");
       
        inbuf.fill(channel);
       
        CharArrayBuffer line = new CharArrayBuffer(64);
       
        line.clear();
        assertTrue(inbuf.readLine(line, false));
View Full Code Here

Examples of org.apache.mina.common.ByteBuffer.fill()

        for (int i = 0; i < _chunkCount; i++)
        {
            ByteBuffer buf = ByteBuffer.allocate(_chunkSize, false);
            byte check = (byte) (i % 128);
            buf.put(check);
            buf.fill((byte) 88, buf.remaining());
            buf.flip();

            _session.write(buf);
        }
View Full Code Here

Examples of org.apache.mina.core.buffer.IoBuffer.fill()

        IoBuffer buf = IoBuffer.allocate(8).setAutoShrink(true);

        // Make sure the buffer doesn't shrink too much (less than the initial
        // capacity.)
        buf.sweep((byte) 1);
        buf.fill(7);
        buf.compact();
        assertEquals(8, buf.capacity());
        assertEquals(1, buf.position());
        assertEquals(8, buf.limit());
        buf.clear();
View Full Code Here

Examples of org.apache.phoenix.query.KeyRange.fill()

                default:
                    range = childPart.getKeyRange(op, rhs);
                    break;
                }
                Integer length = getColumn().getByteSize();
                return length == null ? range : range.fill(length);
            }

            @Override
            public List<Expression> getExtractNodes() {
                return Collections.<Expression>emptyList();
View Full Code Here

Examples of org.archive.cdxserver.CDXQuery.fill()

      if (from != null) {
        query.setFrom(from);
      }
     
      try {
            query.fill(request);
          } catch (ServletRequestBindingException e1) {
            //Ignore
          }
 
        cdxServer.getCdx(request, response, query);
View Full Code Here

Examples of org.eclipse.jetty.io.EndPoint.fill()

                }

                if (!parse(buffer))
                    return false;

                int read = endPoint.fill(buffer);
                // Avoid boxing of variable 'read'
                if (LOG.isDebugEnabled())
                    LOG.debug("Read {} bytes from {}", read, endPoint);

                if (read > 0)
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.