Package com.mucommander.commons.io.bom

Examples of com.mucommander.commons.io.bom.BOMInputStream


    void loadDocument(InputStream in, final String encoding, DocumentListener documentListener) throws IOException {
        // If the encoding is UTF-something, wrap the stream in a BOMInputStream to filter out the byte-order mark
        // (see ticket #245)
        if(encoding != null && encoding.toLowerCase().startsWith("utf")) {
            in = new BOMInputStream(in);
        }

        // If the given encoding is invalid (null or not supported), default to "UTF-8"
        this.encoding = encoding==null || !Charset.isSupported(encoding) ? "UTF-8" : encoding;
View Full Code Here

TOP

Related Classes of com.mucommander.commons.io.bom.BOMInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.