code: private void writePrefix(int type, int length)
      {
          if (length >= lnIsVarLen)
          {
              writeVarUInt(length);
              length = lnIsVarLen;
          }
  
          int offset = myOffset;
          if (--offset < 0) {
              offset = growBuffer(offset);
          }
          myBuffer[offset] = (byte) (type | length);
          myOffset = offset;
      }
docs: Writes the prefix (type and length) preceding the body of an encoded
  value. This method is only called <em>after</em> a value's body is
  written to the buffer.
  
  @param type
  the value's type, a four-bit high-nibble mask
  @param length
  the number of bytes (octets) in the body, excluding the prefix
  itself