code: public long getWorkspaceDataSize() throws RepositoryException
     {
        final WorkspaceStorageConnection con = dataContainer.openConnection();
        try
        {
           return con.getWorkspaceDataSize();
        }
        finally
        {
           con.close();
        }
     }
docs: Returns workspace data size. See for details WorkspaceQuotaManagerImpl#getWorkspaceDataSize().
  
  @throws RepositoryException
  if any exception is occurred