Examples of position()


Examples of it.unimi.dsi.io.InputBitStream.position()

        cacheBitStreamOut.flush();
        ibs = cacheBitStreamIn;
        ibs.flush();
      }

      ibs.position( 0 );

      currDoc = -1;
      for( int j = totalFrequency; j-- != 0; ) {
        obs = indexWriter.newDocumentRecord();
        indexWriter.writeDocumentPointer( obs, currDoc = ibs.readDelta() + currDoc + 1 );
View Full Code Here

Examples of jade.content.onto.annotations.Slot.position()

             * if there's a @Slot annotation which specifies the name of the slot, use it
             */
            if (!Slot.USE_METHOD_NAME.equals(slotAnnotation.name())) {
              slotName = slotAnnotation.name();
            }
            if (slotAnnotation.position() != -1) {
              position = slotAnnotation.position();
              orderByPosition = true;
            }
            if (!Slot.NULL.equals(slotAnnotation.defaultValue())) {
              defaultValue = slotAnnotation.defaultValue();
View Full Code Here

Examples of java.nio.Buffer.position()

  private void position(TestHarness h, BufferFactory factory)
  {
    Buffer buf = null;

    buf = factory.newInstance();
    h.check(buf.position(1), buf,  "position: buf.position(1)");
    checkStatus(h, buf, "position", 10, 10, true, 9, 1);
    buf.position(10);
    checkStatus(h, buf, "position", 10, 10, false, 0, 10);

    // position can't be negative
View Full Code Here

Examples of java.nio.ByteBuffer.position()

    if (read == -1) {  // EOF
      reachedEOF = true;
      IOLoop.INSTANCE.updateHandler(channel, interestOps &= ~SelectionKey.OP_READ);
      return;
    }
    readBuffer.append(new String(buffer.array(), 0, buffer.position(), Charsets.ISO_8859_1));
    logger.debug("readBuffer size: {}", readBuffer.length());
    checkReadState();
  }

  /**
 
View Full Code Here

Examples of java.nio.CharBuffer.position()

                // skip past the coding error
                inbuf.position(inbuf.position() + result.length());

                // undo the flip() to prepare the output buffer
                // for more translation
                dest.position(dest.limit());
                dest.limit(dest.capacity());
                dest.put((char)0xfffd); // backward compatible
            } else {
                throw new AssertionError(result);
            }
View Full Code Here

Examples of java.nio.DoubleBuffer.position()

  }

  private static DoubleBuffer doNoCopyWrap(DoubleBuffer buffer) {
    DoubleBuffer direct_buffer = lookupBuffer(buffer);
    direct_buffer.limit(buffer.limit());
    direct_buffer.position(buffer.position());
    return direct_buffer;
  }

  private static ByteBuffer lookupBuffer(ByteBuffer buffer) {
    return getCachedBuffers(buffer.remaining()).byte_buffer;
View Full Code Here

Examples of java.nio.FloatBuffer.position()

  }

  private static FloatBuffer doNoCopyWrap(FloatBuffer buffer) {
    FloatBuffer direct_buffer = lookupBuffer(buffer);
    direct_buffer.limit(buffer.limit());
    direct_buffer.position(buffer.position());
    return direct_buffer;
  }

  private static LongBuffer doNoCopyWrap(LongBuffer buffer) {
    LongBuffer direct_buffer = lookupBuffer(buffer);
View Full Code Here

Examples of java.nio.IntBuffer.position()

  }

  private static IntBuffer doNoCopyWrap(IntBuffer buffer) {
    IntBuffer direct_buffer = lookupBuffer(buffer);
    direct_buffer.limit(buffer.limit());
    direct_buffer.position(buffer.position());
    return direct_buffer;
  }

  private static FloatBuffer doNoCopyWrap(FloatBuffer buffer) {
    FloatBuffer direct_buffer = lookupBuffer(buffer);
View Full Code Here

Examples of java.nio.LongBuffer.position()

  }

  private static LongBuffer doNoCopyWrap(LongBuffer buffer) {
    LongBuffer direct_buffer = lookupBuffer(buffer);
    direct_buffer.limit(buffer.limit());
    direct_buffer.position(buffer.position());
    return direct_buffer;
  }

  private static DoubleBuffer doNoCopyWrap(DoubleBuffer buffer) {
    DoubleBuffer direct_buffer = lookupBuffer(buffer);
View Full Code Here

Examples of java.nio.MappedByteBuffer.position()

         
        size = Math.min(size, fc.size()-offset);
        MappedByteBuffer buf = fc.map(MapMode.READ_ONLY, offset, size);
        for(DirectByteBuffer b : buffers)
        {
          buf.limit(buf.position()+b.remaining(DirectByteBuffer.SS_FILE));
          b.put(DirectByteBuffer.SS_FILE, buf);
        }
         
       
      } else {
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.