Code example for InputSource

Methods: setEncoding

                        && systemId.equals("systemB")) {
                     * Explicitly set the encoding here or else the parser will 
                     * try to use the parent parser's encoding which is utf-16. 
                    InputSource inputSource = new InputSource(
                            new ByteArrayInputStream("bob".getBytes("utf-8")));
                    return inputSource;
                throw new AssertionError();
            public void startElement(String uri, String localName, String qName,
                    Attributes attributes) throws SAXException {
Contextual code suggestions in your IDE  Get Codota for Java