Method called to initialize the buffer with a shared copy of data;
this means that buffer will just have pointers to actual data. It
also means that if anything is to be appended to the buffer, it
will first have to unshare it (make a local copy).
971417
public void resetWithShared(char[] buf, int start, int len)
    {
        // Let's first mark things we need about input buffer
        mInputBuffer = buf;
        mInputStart = start;
        mInputLen = len;

        // Then clear intermediate values, if any:
        mResultString = null;
        mResultArray = null;

        // And then reset internal input buffers, if necessary:
        if (mHasSegments) {
            clearSegments();
        }
    }
868399
@Override
    public DataBuffer createSame(DataBuffer buffer, boolean init) {
        switch (buffer.dataType()) {
            case INT:
                return createInt(buffer.length(), init);
            case FLOAT:
                return createFloat(buffer.length(), init);
            case DOUBLE:
                return createDouble(buffer.length(), init);
            case HALF:
                return createHalf(buffer.length(), init);
            default:
                throw new UnsupportedOperationException("Unknown dataType: " + buffer.dataType());
        }
    }
333059
private void init() {
        generalHuffsize();
        generalHuffcode();

        int i = 0, j = 0;
        for (;;) {
            i++;

            if (i > 16) {
                break;
            }

            if (L[i] == 0) {
                maxcode[i] = -1;
                continue;
            } else {
                valptr[i] = j;
                mincode[i] = huffcode[j];
                j = j + L[i] - 1;
                maxcode[i] = huffcode[j];
                j++;
            }
        }

        maxcode[17] = 0xFFFFFF;
    }
350292
public void init(Object data, int iFieldsTypes)
    {
        if (data == null)
            this.clearBuffer();
        else
        {
            m_iHeaderCount = 0;
            this.setPhysicalData(data);
            this.resetPosition();
        }
        m_iFieldsTypes = iFieldsTypes;      // Default - assume all fields (call bufferToFields(xxx, false) if not)
    }
146681
function Buf(buffer) {
  this._initialSize = 64 * 1024;
  this._stepSize = this._initialSize;
  this._pos = 0;

  if (typeof buffer === 'number') {
    this._initialSize = buffer;
  }
  if (buffer instanceof Buffer) {
    this._buf = buffer;
  } else {
    this._buf = new Buffer(this._initialSize);
  }
}
922087
@Override
    public void write(ByteBuffer buffer) {
//        if (obj instanceof Persistable)
//            ((Persistable) obj).write(buffer);
//        else {
        if (obj != null)
            buffer.put(getSerialized());
        tmpBuffer = null;
//        }
    }
641362
@Override
  protected void initialize(Map<String, ?> sharedState, Map<String, ?> options) {
    String fileName = (String) options.get("file");
    passwordFile = new File(fileName);
  }
538018
private void bufferRows1() throws IOException {
		BinaryRow copy = key1.copy();
		buffer1.reset();
		do {
			buffer1.add(row1);
		} while (nextRow1() && keyComparator.compare(key1, copy) == 0);
		buffer1.complete();
	}
218994
public void init(TempCharBuffer head)
  {
    _top = head;
    _head = head;

    if (head != null) {
      _buffer = head.buffer();
      _length = head.getLength();
    }
    else
      _length = 0;

    _offset = 0;
  }
1022938
public void put(int data)
    {
        // If the buffer is small.
        if (mBuffer.capacity() < (mLength + 1))
        {
            expandBuffer(mLength + ADDITIONAL_BUFFER_SIZE);
        }

        mBuffer.put((byte)data);
        ++mLength;
    }
49593
public void initializeReferenceData() {
        if (_referenceDataActivationManager == null) {
            return;
        }
        final Collection<Object> referenceDataCollection = _referenceDataActivationManager.getAllReferenceData();
        for (Object referenceData : referenceDataCollection) {
            ComponentDescriptor<? extends Object> descriptor = Descriptors.ofComponent(referenceData.getClass());

            assignProvidedProperties(descriptor, referenceData);
            initialize(descriptor, referenceData);
        }
    }
194715
def _increment_current_byte(self):
        
        # If the current byte is uninitialized, then incrementing it will make it 1
        if self.tape[self.pointer] is None:
            self.tape[self.pointer] = 1
        elif self.tape[self.pointer] == self.MAX_CELL_SIZE:  # If the current byte is already at the max, then overflow
            self.tape[self.pointer] = self.MIN_CELL_SIZE
        else:  # increment it
            self.tape[self.pointer] += 1
867724
public ByteBuffer getData() {
        if (this.buffer == null) {
            throw new IllegalStateException("ByteBuffer must have data before it is ready for use.");
        }
        final ByteBuffer copy = CausticUtil.createByteBuffer(buffer.capacity());
        buffer.rewind();
        copy.put(buffer);
        copy.flip();
        return copy;
    }
846164
public synchronized void addBuffer(byte[] buf, int off, int len) {
		if (copyBuffers) {
			byte[] b = new byte[len];
			System.arraycopy(buf, off, b, 0, len);
			buf = b;
			off = 0;
		}
		buffers.add(new Triple<>(buf, Integer.valueOf(off), Integer.valueOf(len)));
		totalSize += len;
	}
255684
def initialize_copy( original_obj )
      @vertices = Array.new(original_obj.vertices.size)
      for i in 0..@vertices.size-1
        @vertices[i] = original_obj.vertices[i].dup
      end
      @is_open = original_obj.is_open
    end
1225254
def _init_append(self):
        
        # Require to load the full file content in buffer
        self._write_buffer[:] = self._readall()

        # Make initial seek position to current end of file
        self._seek = self._size
599923
function(rawBuffer) {
    if (rawBuffer && this.offset === 0) return this.buffer;

    var out = new Buffer(8);
    this.buffer.copy(out, 0, this.offset, this.offset + 8);
    return out;
  }