code: public static final StyleSheet parseString(String css, URL base, NetworkProcessor network) throws IOException,
              CSSException {
          URL baseurl = base;
          if (baseurl == null)
              baseurl = new URL("file:///base/url/is/not/specified"); //prevent errors if there are still some relative URLs used
          return getCSSParserFactory().parse(css, network, null, SourceType.EMBEDDED, baseurl);
      }
docs: Parses text into a StyleSheet
  
  @param css
  Text with CSS declarations
  @param base
  The URL to be used as a base for loading external resources. Base URL may
  be {@code null} if there are no external resources in the CSS string
  referenced by relative URLs.
  @param network
  Network processor for retrieving the URL resources
  @return Parsed StyleSheet
  @throws IOException
  When exception during read occurs
  @throws CSSException
  When exception during parse occurs