class JVoiceXmlDocumentServer implements DocumentServer {

    @Override
    public URI storeAudio(final AudioInputStream in) throws BadFetchError {
        try {
            final File directory = getRecordingsDirectory();
            final File file = File.createTempFile("rec-", ".wav", directory);
            AudioSystem.write(in, AudioFileFormat.Type.WAVE, file);
            LOGGER.info("recorded to file '" + file.toURI() + "'");
            return file.toURI();
        } catch (IOException ex) {
            throw new BadFetchError(ex.getMessage(), ex);
        }
    }

    public  JVoiceXmlDocumentServer();

}