code: public long getNodeDataSizeDirectly(String nodePath) throws QuotaManagerException
     {
        try
        {
           NodeData node = (NodeData)dataManager.getItemData(Constants.ROOT_UUID);
  
           JCRPath path = lFactory.parseRelPath(nodePath.substring(1)); // let ignore root entry '[]:1'
           for (QPathEntry entry : path.getInternalPath().getEntries())
           {
              node = (NodeData)dataManager.getItemData(node, entry, ItemType.NODE, false);
  
              if (node == null) // may be already removed
              {
                 throw new ItemNotFoundException("Node " + nodePath + " not found in workspace");
              }
           }
  
           CalculateNodeDataSizeVisitor visitor = new CalculateNodeDataSizeVisitor(dataManager);
           node.accept(visitor);
  
           return visitor.getSize();
        }
        catch (RepositoryException e)
        {
           throw new QuotaManagerException(e.getMessage(), e);
        }
     }
docs: Calculates node data size by asking directly respective {@link WorkspacePersistentDataManager}.