Code example for ByteArrayInputStream

Methods: close

0
            Log.logWarning("opensearchdescriptionReader", "response incomplete"); 
            return null; 
        } 
 
        // make input stream 
        final ByteArrayInputStream bais = new ByteArrayInputStream(a);
 
        // parse stream 
        opensearchdescriptionReader reader = null;
        try { 
            reader = new opensearchdescriptionReader(bais);
        } catch (final Exception e) {
            Log.logWarning("opensearchdescriptionReader", "parse exception: " + e);
            return null; 
        } 
        try { bais.close(); } catch (final IOException e) {}
        return reader;
    } 
 
    @Override 
    public void startElement(final String uri, final String name, final String tag, final Attributes atts) throws SAXException {