Examples of position()


Examples of org.apache.abdera.util.io.CodepointIterator.position()

      }
    }
    h = b = buf.length();
    if (b > 0) buf.append((char)delimiter);
    while (h < chars.length) {
      ci.position(0);
      i = -1;
      m = Integer.MAX_VALUE;
      while(ci.hasNext()) {
        i = ci.next();
        if (i >= n && i < m) m = i;
View Full Code Here

Examples of org.apache.activeio.packet.Packet.position()

        if( dup.remaining() < payloadLength+RECORD_FOOTER_SIZE ) {
            return false;
        }
       
        // Set limit to create a slice of the payload.
        dup.limit(dup.position()+payloadLength);
        this.payload = dup.slice();       
      if( isChecksumingEnabled() ) {
          checksum(new DataInputStream(new PacketToInputStream(payload)));
      }
     
View Full Code Here

Examples of org.apache.activemq.util.DataByteArrayOutputStream.position()

    private byte[] encodeXid(XATransactionId xid, long seq, long priority) {
        byte[] xidVal = xid.getEncodedXidBytes();
        // encode the update
        DataByteArrayOutputStream outputStream = xid.internalOutputStream();
        outputStream.position(1);
        outputStream.writeLong(seq);
        outputStream.writeByte(Long.valueOf(priority).byteValue());
        return xidVal;
    }
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.DataField.position()

                if (isMessageOrdered() && obj != null) {

                    // Generate a key using the number of the section
                    // and the position of the field
                    Integer key1 = sections.get(obj.getClass().getName());
                    Integer key2 = datafield.position();
                    Integer keyGenerated = generateKey(key1, key2);

                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Key generated: {}, for section: {}", String.valueOf(keyGenerated), key1);
                    }
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.KeyValuePairField.position()

                if (this.isMessageOrdered()) {
                    // Generate a key using the number of the section
                    // and the position of the field
                    Integer key1 = sections.get(obj.getClass().getName());
                    Integer key2 = keyValuePairField.position();
                   
                    LOG.debug("Key of the section: {}, and the field: {}", key1, key2);
                
                    Integer keyGenerated = generateKey(key1, key2);
View Full Code Here

Examples of org.apache.cassandra.config.ColumnDefinition.position()

                        if (newType instanceof CounterColumnType)
                            throw new InvalidRequestException(String.format("counter type is not supported for PRIMARY KEY part %s", columnName));
                        if (cfm.getKeyValidator() instanceof CompositeType)
                        {
                            List<AbstractType<?>> oldTypes = ((CompositeType) cfm.getKeyValidator()).types;
                            if (!newType.isValueCompatibleWith(oldTypes.get(def.position())))
                                throw new ConfigurationException(String.format("Cannot change %s from type %s to type %s: types are incompatible.",
                                                                               columnName,
                                                                               oldTypes.get(def.position()).asCQL3Type(),
                                                                               validator));
View Full Code Here

Examples of org.apache.fop.complexscripts.fonts.GlyphPositioningTable.position()

                GlyphSequence tigs = tf.mapCharsToGlyphs ( wf );
                assertSameGlyphs ( iga, getGlyphs ( tigs ), "input glyphs", wf, tfn );
                GlyphSequence togs = gsub.substitute ( tigs, script, language );
                assertSameGlyphs ( oga, getGlyphs ( togs ), "output glyphs", wf, tfn );
                int[][] tpaa = new int [ togs.getGlyphCount() ] [ 4 ];
                if ( gpos.position ( togs, script, language, 1000, widths, tpaa ) ) {
                    assertSameAdjustments ( paa, tpaa, wf, tfn );
                } else if ( paa != null ) {
                    assertEquals ( "unequal adjustment count, word form(" + wf + "), font (" + tfn + ")", paa.length, 0 );
                }
            }
View Full Code Here

Examples of org.apache.fop.complexscripts.scripts.ScriptProcessor.position()

     */
    public boolean position ( GlyphSequence gs, String script, String language, int fontSize, int[] widths, int[][] adjustments ) {
        Map/*<LookupSpec,List<LookupTable>>*/ lookups = matchLookups ( script, language, "*" );
        if ( ( lookups != null ) && ( lookups.size() > 0 ) ) {
            ScriptProcessor sp = ScriptProcessor.getInstance ( script );
            return sp.position ( this, gs, script, language, fontSize, lookups, widths, adjustments );
        } else {
            return false;
        }
    }

View Full Code Here

Examples of org.apache.hadoop.hbase.index.util.ByteArrayBuilder.position()

              update = true;
              break;
            }
          }
          if (kvFound == null) {
            indexRow.position(indexRow.position() + cq.getMaxValueLength());
          } else {
            IndexUtils.updateRowKeyForKV(cq, kvFound, indexRow);
          }
        }
        if (update) {
View Full Code Here

Examples of org.apache.mina.codec.IoBuffer.position()

            IoBuffer buffer = IoBuffer.wrap(encoder.encode(value));

            for (int i = 0; i < buffer.remaining(); i++) {
                IoBuffer partialBuffer = buffer.slice();
                partialBuffer.limit(partialBuffer.position() + i);
                try {
                    assertNull(decoder.decode(partialBuffer));
                } catch (ProtocolDecoderException e) {
                    fail("Should not throw exception");
                }
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.