Examples of offset()


Examples of org.apache.spark.storage.FileSegment.offset()

      }
      int len = (int) length;
      ctx.write((new FileHeader(len, blockId)).buffer());
      try {
        ctx.write(new DefaultFileRegion(new FileInputStream(file)
          .getChannel(), fileSegment.offset(), fileSegment.length()));
      } catch (Exception e) {
          LOG.error("Exception: ", e);
      }
    } else {
      ctx.write(new FileHeader(0, blockId).buffer());
View Full Code Here

Examples of org.codehaus.preon.annotation.BoundList.offset()

                // This means we need to keep on reading elements until we get
                // an 'EOF' or a DecodingException. In case of a
                // DecodingException, the pointer is expected to be moved back
                // to the first position.
                return (Codec<T>) new DynamicListCodec(codec);
            } else if (settings.offset().length() != 0) {
                // So the size is known. If the offset attribute has been set,
                // it means we can calculate the position of the individual
                // elements based on the index of that element.
                Expression<Integer, Resolver> size = getSizeExpression(
                        settings, context);
View Full Code Here

Examples of org.elasticsearch.common.BytesHolder.offset()

                    sourceRequested = true;
                } else if (gFields.length == 0) {
                    // no fields, and no source
                    sourceRequested = false;
                } else {
                    Map<String, Object> sourceAsMap = SourceLookup.sourceAsMap(source.bytes(), source.offset(), source.length());
                    SearchLookup searchLookup = null;
                    for (String field : gFields) {
                        if (field.equals("_source")) {
                            sourceRequested = true;
                            continue;
View Full Code Here

Examples of org.elasticsearch.hadoop.util.BytesArray.offset()

                generator.flush();
                generator.close();

                // jackson likely will add leading/trailing "" which are added down the pipeline so remove them
                // however that's not mandatory in case the source is a number (instead of a string)
                if ((lookForQuotes && !addQuotesIfNecessary) && ba.bytes()[ba.offset()] == '"') {
                    ba.size(Math.max(0, ba.length() - 2));
                    ba.offset(1);
                }
            }
        }
View Full Code Here

Examples of org.elasticsearch.hadoop.util.BytesArray.offset()

                // jackson likely will add leading/trailing "" which are added down the pipeline so remove them
                // however that's not mandatory in case the source is a number (instead of a string)
                if ((lookForQuotes && !addQuotesIfNecessary) && ba.bytes()[ba.offset()] == '"') {
                    ba.size(Math.max(0, ba.length() - 2));
                    ba.offset(1);
                }
            }
        }
    }
View Full Code Here

Examples of org.jboss.aerogear.controller.router.rest.pagination.PaginationProperties.offset()

public class PagingPropertiesTest {

    @Test
    public void offset() {
        final PaginationProperties params = new PaginationProperties(10, 25, 100);
        assertThat(params.offset()).isEqualTo(10);
        assertThat(params.limit()).isEqualTo(25);
        assertThat(params.total().get()).isEqualTo(100);
    }

    @Test
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Matrix.offset()

        final Matrix m = mA.addAssign(mB);
        if (m != mA) {
            fail("addAssign must return <this>");
        }

        final int offset = m.offset();
        for (int row=offset; row<m.rows()+offset; row++) {
            for (int col=offset; col<m.cols()+offset; col++) {
                if (m.get(row, col) != row-offset+5) {
                    fail("addAssign failed");
                }
View Full Code Here

Examples of org.netbeans.api.lexer.TokenSequence.offset()

            for (BracePair bp : bracePairs) {
                if (ordinal == bp.open) {
                    originToken = bp.open;
                    matchToken = bp.close;
                    searchForward = true;
                    ret = new int[]{ts.offset(), ts.offset() + token.length()};
                } else if (ordinal == bp.close) {
                    originToken = bp.close;
                    matchToken = bp.open;
                    searchForward = false;
                    ret = new int[]{ts.offset(), ts.offset() + token.length()};
View Full Code Here

Examples of org.sgx.yuigwt.yui.widget.slider.SliderEvent.offset()

    sl1.on(Slider.EVENT_THUMBMOVE, new EventCallback() {
     
      @Override
      public void call(EventFacade e_) {
        SliderEvent e = (SliderEvent)e_;
        String fsize = (e.offset()+8)+"px";
        ss1.set(".sstest1", Style.create().fontSize(fsize));
      }
    });
   
    parent.append("<p class=\"sstest1\">tres tristes tigres comen trigo en el trigal</p>");
View Full Code Here

Examples of org.sonar.api.server.debt.DebtRemediationFunction.offset()

    if (hasDebt) {
      return mergeDebtDefinitions(def, dto,
        subCharacteristic.getId(),
        debtRemediationFunction.type().name(),
        debtRemediationFunction.coefficient(),
        debtRemediationFunction.offset(),
        def.effortToFixDescription());
    }
    return mergeDebtDefinitions(def, dto, null, null, null, null, null);
  }
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.