/*
@returns the underlying buffer.
769590
byte[] getBuffer()
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) {
            trace.entry(this,
                        cclass,
                        "getBuffer");
            trace.exit(this,
                       cclass,
                       "getBuffer",
                       "return length="
                                       + buf.length);
        }
        return buf;
    }
1184118
public ByteBuffer getByteBuffer() {
		final ByteBuffer bb = ByteBuffer.wrap(buf);
		bb.limit(bufLimit);
		bb.position(bufPosition);
		return bb;
	}
1173243
public ByteBuffer getIndicesBuffer() {
        final ByteBuffer buffer = CausticUtil.createByteBuffer(indices.size() * DataType.INT.getByteSize());
        for (int i = 0; i < indices.size(); i++) {
            buffer.putInt(indices.get(i));
        }
        buffer.flip();
        return buffer;
    }
443806
private byte[] getBuffer(byte b) {
		if (b != 0 & b != -1) return null;
		byte[] buffer;
		switch (b) {
		case 0: buffer = sZerosBuffer; break;
		case -1 : buffer = sOnesBuffer; break;
		default: return null;
		}

		if (buffer == null) {
			buffer = new byte[PAD_BUFFER];
			if (b != 0) {
				Arrays.fill(buffer, b);
				sOnesBuffer = buffer;
			} else {
				sZerosBuffer = buffer;
			}
		}
		return buffer;
	}
1262269
public String getOriginalString() {

    if (this.string != null) {
      this.string = new String(this.buffer, this.initialOffset, getLength());
    }
    return this.string;
  }
968788
public IoBuffer fetchOutNetBuffer() {
        IoBuffer answer = outNetBuffer;
        if (answer == null) {
            return emptyBuffer;
        }

        outNetBuffer = null;
        return answer.shrink();
    }
1033327
public ByteBuffer getWkbByteBuffer() {
		return ByteBuffer.wrap(bytes, wkbGeometryIndex,
				bytes.length - wkbGeometryIndex).order(byteOrder);
	}
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;
    }
304123
public int getSize() {
    if (mPooledByteBufferRef != null && mPooledByteBufferRef.get() != null) {
      return mPooledByteBufferRef.get().size();
    }
    return mStreamSize;
  }
653501
function() {
      var result = new StringBuffer();
      var array = this._input.split('');
      // var prev = null;

      for (var i = 0; i < array.length; i++) {
        var cur = array[i];
        var next = array[i + 1];

        if (typeof next !== 'undefined') {
          var curToken = cur + next;

          if (this._mode.tokens.ia[curToken]) {
            var nextNext = array[i + 2];
            if (typeof nextNext === 'undefined' || /^[-\s]$/.test(nextNext)) {
              result.append(this._mode.tokens.ia[curToken]);
              i++;
              continue;
            }
          }
        }

        if (this._mode.cyr2lat[cur]) {
          result.append(this._mode.cyr2lat[cur]);
        } else {
          result.append(cur);
        }

        // prev = cur;
      }

      return result.toString();
    }
1122326
function() {

		var buffer = '',
			i = 0,
			content = this._content;

		for (; i < this._count; i++) {

			if (typeof(content[i]) == 'string') {

				buffer += content[i];

			} else if (typeof(content[i]) == 'function') {

				Lava.t("Not implemented");

			} else {

				buffer += content[i].render();

			}

		}

		return buffer;

	}
863303
public static Buffer toBuffer(AbstractEvent event) throws IOException {
		final ByteBuffer serializedEvent = EventSerializer.toSerializedEvent(event);

		MemorySegment data = MemorySegmentFactory.wrap(serializedEvent.array());

		final Buffer buffer = new NetworkBuffer(data, FreeingBufferRecycler.INSTANCE, false);
		buffer.setSize(serializedEvent.remaining());

		return buffer;
	}
1170775
public byte[] getBytes() {
		final int len = getVInt();
		final byte[] bytes = new byte[len];
		System.arraycopy(buf, bufPosition, bytes, 0, bytes.length);
		bufPosition += bytes.length;
		return bytes;
	}
734173
public byte[] getFullBBuffer(int minSize)
    {
        byte[] result = null;
        if (mFullBBuffer != null && mFullBBuffer.length >= minSize) {
            result = mFullBBuffer;
            mFullBBuffer = null;
        }
//System.err.println("DEBUG: Alloc BFull: "+result);
        return result;
    }
337160
public synchronized ByteBuffer getBuffer()
    {
        ByteBuffer buf=null;
        int s=LazyList.size(_recycle);
        if (s>0)
        {
            s--;
             buf=(ByteBuffer)LazyList.get(_recycle, s);
             _recycle=LazyList.remove(_recycle,s);
             buf.clear();
        }
        else
        {
            buf=ByteBuffer.allocateDirect(_bufferSize);
        }
         return buf;     
    }
1198869
protected function getBuffer(): TokenBuffer
    {
        if (null === $this->buffer) {
            $this->buffer = TokenBuffer::factory();
        }
        return $this->buffer;
    }
1326175
protected byte[] byteBufferToByteArray() {
        if (byteBuffer.hasArray()) {
            return byteBuffer.array();
        } else {
            final byte[] byteArray = new byte[byteBuffer.remaining()];
            byteBuffer.get(byteArray);
            return byteArray;
        }
    }