Examples of limit()


Examples of org.apache.mina.common.IoBuffer.limit()

                in.position(pos);

                if (ctx.getOverflowPosition() == 0) {
                    IoBuffer buf = ctx.getBuffer();
                    buf.flip();
                    buf.limit(buf.limit() - matchCount);
                    try {
                        out.write(buf.getString(ctx.getDecoder()));
                    } finally {
                        buf.clear();
                    }
View Full Code Here

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

    params.put("canSeekToEnd", true);
    out.writeMap(params, new Serializer());
    buf.flip();

    if (fileMetaSize == 0) {
      fileMetaSize = buf.limit();
    }

    ITag onMetaData = new Tag(ITag.TYPE_METADATA, 0, fileMetaSize, buf, 0);
    writeTag(onMetaData);
  }
View Full Code Here

Examples of org.apache.tomcat.lite.io.BBucket.limit()

                    return;
                }
                if (len > bb.remaining()) {
                    ch.getIn().append(bb);
                    len -= bb.remaining();
                    bb.position(bb.limit());
                } else {
                    ch.getIn().append(bb, len);
                    bb.position(bb.position() + len);
                    len = 0;
                }
View Full Code Here

Examples of org.eclipse.persistence.jpa.rs.annotations.RestPageable.limit()

    @Override
    public boolean isFeatureApplicable() throws JPARSException {
        final RestPageable paginationData = getPaginationData();
        if (paginationData != null) {
            // Field supports pagination, do parameters check
            checkParameters(paginationData.limit());
            return true;
        } else {
            // Pagination is not supported by query. Check that there are no pagination related query parameters.
            if (queryParameters.containsKey(QueryParameters.JPARS_PAGING_LIMIT)
                    || queryParameters.containsKey(QueryParameters.JPARS_PAGING_OFFSET)) {
View Full Code Here

Examples of org.ektorp.ViewQuery.limit()

        final CouchDbConnector connector = _couchDbInstance.createConnector(databaseName, false);

        ViewQuery query = new ViewQuery().allDocs().includeDocs(true);

        if (maxRows > 0) {
            query = query.limit(maxRows);
        }
        if (firstRow > 1) {
            final int skip = firstRow - 1;
            query = query.skip(skip);
        }
View Full Code Here

Examples of org.glassfish.grizzly.Buffer.limit()

     */
    protected int readPostBody(byte body[], int len)
            throws IOException {

        Buffer b = coyoteRequest.getPostBody(len).duplicate();
        final int length = b.limit() - b.position();
        b.get(body, b.position(), length);
        return length;

    }

View Full Code Here

Examples of org.gudy.azureus2.core3.util.DirectByteBuffer.limit()

           
          }else{
           
            read_buffer.position(DirectByteBuffer.SS_PROXY, 0);
           
            read_buffer.limit( DirectByteBuffer.SS_PROXY, read_buffer.capacity(DirectByteBuffer.SS_PROXY));
          }
        }
      }
     
      return( len > 0 );
View Full Code Here

Examples of org.hornetq.utils.TokenBucketLimiter.limit()

            // log.info("sent message " + i);

            if (tbl != null)
            {
               tbl.limit();
            }
         }

         if (transacted && !committed)
         {
View Full Code Here

Examples of org.hornetq.utils.TokenBucketLimiterImpl.limit()

      final long measureTime = 5000;

      while (System.currentTimeMillis() - start < measureTime)
      {
         tbl.limit();

         count++;
      }

      long end = System.currentTimeMillis();
View Full Code Here

Examples of org.idevlab.rjc.SortingParams.limit()

          rjcSort.get(DecodeUtils.decode(bs));
        }
      }
      Range limit = params.getLimit();
      if (limit != null) {
        rjcSort.limit((int) limit.getStart(), (int) limit.getCount());
      }
      Order order = params.getOrder();
      if (order != null && order.equals(Order.DESC)) {
        rjcSort.desc();
      }
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.