}
CssSource getCssSource() throws
IOException
{
CssSource source = null;
if (this.mode == Mode.FILE)
{
source = new CssSource(this.path, ocf.getInputStream(this.path));
String charset;
if (source.getInputStream().getBomCharset().isPresent())
{
charset = source.getInputStream().getBomCharset().get().toLowerCase();
if (!charset.equals("utf-8") && !charset.startsWith("utf-16"))
{
report.message(MessageId.CSS_004, new MessageLocation(path, -1, -1, ""), charset);
}
}
if (source.getInputStream().getCssCharset().isPresent())
{
charset = source.getInputStream().getCssCharset().get().toLowerCase();
if (!charset.equals("utf-8") && !charset.startsWith("utf-16"))
{
report.message(MessageId.CSS_003, new MessageLocation(path, 0, 0, ""), charset);
}
}