Class CssInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.PushbackInputStream
org.idpf.epubcheck.util.css.CssInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
An InputStream for CSS files that detects and skips past BOMs, and
peeks for @charset rules.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) com.google.common.base.Optional<String> (package private) com.google.common.base.Optional<String> private booleanprivate static final intFields inherited from class PushbackInputStream
buf, posFields inherited from class FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringgetBOM()final com.google.common.base.Optional<String> Get the character set as detected from a BOM.final com.google.common.base.Optional<String> Get the value of the CSS @charset rule, if present.private StringgetCssCharset(String bom) private static Stringmap(byte[] data) Methods inherited from class PushbackInputStream
available, close, mark, markSupported, read, read, reset, skip, transferTo, unread, unread, unreadMethods inherited from class FilterInputStream
readMethods inherited from class InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes
-
Field Details
-
Constructor Details
-
CssInputStream
- Throws:
IOException
-
-
Method Details
-
getBOM
- Throws:
IOException
-
getCssCharset
- Throws:
IOException
-
map
-
getBomCharset
Get the character set as detected from a BOM. If present, the returned string is one of 'UTF-32BE', 'UTF-32LE", 'UTF-8", 'UTF-16BE' or 'UTF-16LE". -
getCssCharset
Get the value of the CSS @charset rule, if present.
-