class JVoiceXmlDocumentServer implements DocumentServer {

    @Override
    public AudioInputStream getAudioInputStream(final String sessionId,
            final URI uri) throws BadFetchError {
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("retrieving audio input stream '" + uri + "'");
        }

        final SchemeStrategy strategy = getSchemeStrategy(uri);
        final FetchAttributes attrs = mergeFetchAttributes(null);
        final long timeout = attrs.getFetchTimeout();

        try {
            final InputStream input = strategy.getInputStream(sessionId, uri,
                    RequestMethod.GET, timeout, null);
            // Some InputStreams do not support mark/reset which is required
            // by the AudioSystem. So we use a BufferedInputStream that
            // guarantees these features.
            final BufferedInputStream buf = new BufferedInputStream(input);
            return AudioSystem.getAudioInputStream(buf);
        } catch (javax.sound.sampled.UnsupportedAudioFileException e) {
            throw new BadFetchError(e.getMessage(), e);
        } catch (java.io.IOException e) {
            throw new BadFetchError(e.getMessage(), e);
        } catch (UnsupportedElementError e) {
            throw new BadFetchError(e.getMessage(), e);
        }
    }

    public  JVoiceXmlDocumentServer();

}