Puts a 64-bit integer into the buffer at the given position. Does
not increase the write position.
@param pos the position where to put the integer
@param l the 64-bit integer to put
963650
public void putLong(int pos, long l) {
		adaptSize(pos + 8);
		ByteBuffer bb = getBuffer(pos);
		int index = pos % _bufferSize;
		if (bb.limit() - index >= 8) {
			bb.putLong(index, l);
		} else {
			byte b0 = (byte)l;
			byte b1 = (byte)(l >> 8);
			byte b2 = (byte)(l >> 16);
			byte b3 = (byte)(l >> 24);
			byte b4 = (byte)(l >> 32);
			byte b5 = (byte)(l >> 40);
			byte b6 = (byte)(l >> 48);
			byte b7 = (byte)(l >> 56);
			
			if (_order == ByteOrder.BIG_ENDIAN) {
				putBytes(pos, b7, b6, b5, b4, b3, b2, b1, b0);
			} else {
				putBytes(pos, b0, b1, b2, b3, b4, b5, b6, b7);
			}
		}
	}
1109541
public final int getUint8(final int pos) {
        if (pos >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: " + pos);

        return 0xff & buffer[origin + pos];
    }
453530
public final LogBuffer duplicate(final int pos, final int len) {
        if (pos + len > limit) throw new IllegalArgumentException("limit excceed: " + (pos + len));

        // XXX: Do momery copy avoid buffer modified.
        final int off = origin + pos;
        byte[] buf = Arrays.copyOfRange(buffer, off, off + len);
        return new LogBuffer(buf, 0, len);
    }
127162
public void writeBinary(PacketOutputStream pos) throws IOException {
    String value = bigDecimal.toPlainString();
    pos.writeFieldLength(value.length());
    pos.write(value);
  }
1297208
def put(self, lo, hi):
        """"""
        self.buf.append(lo)
        self.buf.append(hi)
        self.pos += 1
425692
public void writeBinary(final PacketOutputStream pos) throws IOException {
    if (length == Long.MAX_VALUE) {
      pos.write(reader, false, noBackslashEscapes);
    } else {
      pos.write(reader, length, false, noBackslashEscapes);
    }
  }
175518
public final long getBeLong64(final int pos) {
        final int position = origin + pos;

        if (pos + 7 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: "
                                                                            + (pos < 0 ? pos : (pos + 7)));

        byte[] buf = buffer;
        return ((long) (0xff & buf[position + 7])) | ((long) (0xff & buf[position + 6]) << 8)
               | ((long) (0xff & buf[position + 5]) << 16) | ((long) (0xff & buf[position + 4]) << 24)
               | ((long) (0xff & buf[position + 3]) << 32) | ((long) (0xff & buf[position + 2]) << 40)
               | ((long) (0xff & buf[position + 1]) << 48) | ((long) (buf[position]) << 56);
    }
1117112
public static void writeLong(byte[] buf, int pos, long v) {
    checkBoundary(buf, pos, 8);
    buf[pos++] = (byte) (0xff & (v >> 56));
    buf[pos++] = (byte) (0xff & (v >> 48));
    buf[pos++] = (byte) (0xff & (v >> 40));
    buf[pos++] = (byte) (0xff & (v >> 32));
    buf[pos++] = (byte) (0xff & (v >> 24));
    buf[pos++] = (byte) (0xff & (v >> 16));
    buf[pos++] = (byte) (0xff & (v >> 8));
    buf[pos] = (byte) (0xff & v);
  }
434339
public static int readInt(ByteBuffer buf, int pos) {
    return (((buf.get(pos) & 0xff) << 24) | ((buf.get(pos + 1) & 0xff) << 16)
        | ((buf.get(pos + 2) & 0xff) << 8) | (buf.get(pos + 3) & 0xff));
  }
462181
private void setValueAtPosition(int pos, ByteArraySegment value) {
        Preconditions.checkElementIndex(pos, getCount(), "pos must be non-negative and smaller than the number of items.");
        Preconditions.checkArgument(value.getLength() == this.config.valueLength, "Given value has incorrect length.");
        this.data.copyFrom(value, pos * this.config.entryLength + this.config.keyLength, value.getLength());
    }
103587
void insertValueAtPosition(final T value, final int pos) {
    if ((pos < 0) || (pos >= getNumSamples())) {
      throw new SketchesArgumentException("Insert position must be between 0 and "
              + getNumSamples() + ", " + "inclusive. Received: " + pos);
    }

    data_.set(pos, value);
  }
325609
public void setPos(int pos) {

        position = pos;

        NodeAVL n = nPrimaryNode;

        while (n != null) {
            ((NodeAVLDisk) n).iData = position;
            n                       = n.nNext;
        }
    }
1072560
public void position(long p) throws IOException {
        long blockStart = (input.position() - maxOffset) 
         / buffer.length * buffer.length;
        long blockEnd = blockStart + maxOffset;
        if ((p >= blockStart) && (p < blockEnd)) {
            // Desired position is somewhere inside current buffer
            long adj = p - blockStart;
            offset = (int)adj;
            return;
        }
        positionDirect(p);
    }
384146
public void seek(long pos) throws IOException {

		int n = (int) (real_pos - pos);

		if (n >= 0 && n <= buf_end) {

			buf_pos = buf_end - n;

		} else {

			raf.seek(pos);

			buf_end = 0;
			buf_pos = 0;
			real_pos = raf.getFilePointer();
		}
	}
631046
@Override
    public void position(long pos) {
        log.debug("position: {}", pos);
        currentFrame = getFrame(pos);
        log.debug("Setting current sample: {}", currentFrame);
    }
167037
public void insertNode(int n, int pos)
  {

    if (!m_mutable)
      throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!");

    insertElementAt(n, pos);
  }
744338
protected void position(int newPosition)
  {
    if (tc.isEntryEnabled()) Tr.entry(tc, "position", new Object[]{this,new Integer(newPosition)});

    newPosition -= _absolutePosition;
    _buffer.position(newPosition);

    if (tc.isEntryEnabled()) Tr.exit(tc, "position");
  }