docs: static public int writeTypeDescWithLength(OutputStream userstream, int typeid, int lenOfLength, int valueLength) throws IOException
      {
          int written_len = 1;
  
          int td = ((typeid & 0xf) << 4);
          if (valueLength >= _Private_IonConstants.lnIsVarLen) {
              td |= _Private_IonConstants.lnIsVarLen;
              userstream.write((byte)(td & 0xff));
              written_len += writeVarUInt(userstream, (long)valueLength, lenOfLength, true);
          }
          else {
              td |= (valueLength & 0xf);
              userstream.write((byte)(td & 0xff));
          }
          return written_len;
      }