Code example for StreamSource

Methods: getInputStream, getReader

0
/* 171*/        if(source instanceof StreamSource)
                { 
/* 172*/            StreamSource streamsource = (StreamSource)source;
/* 181*/            String s = source.getSystemId();
/* 186*/            InputSource inputsource1 = new InputSource(s);
/* 187*/            inputsource1.setCharacterStream(streamsource.getReader());
/* 188*/            inputsource1.setByteStream(streamsource.getInputStream());
/* 189*/            return new SAXSource(flag ? getStyleParser() : getSourceParser(), inputsource1);
                } else 
                { 
/* 193*/            throw new IllegalArgumentException("Unknown type of source");
                } 
            } 
 
            public Source getAssociatedStylesheet(Source source, String s, String s1, String s2)
                throws TransformerConfigurationException 
            { 
/* 223*/        PIGrabber pigrabber = new PIGrabber();
/* 224*/        pigrabber.setCriteria(s, s1, s2);
/* 225*/        pigrabber.setBaseURI(source.getSystemId());
/* 226*/        pigrabber.setURIResolver(resolver);