class BambooVersionExtractor {

    static String extractVersion(URL url) throws BambooVersionNotFoundException {
        InputStream stream = null;
        try {
            stream = url.openStream();
            byte[] bytes = ByteStreams.toByteArray(stream);
            String page = new String(bytes);
            return extractVersion(page);
        } catch (IOException e) {
            throw new BambooVersionNotFoundException("Can't extract version from url:" + url, e);
        } finally {
            Closeables.closeQuietly(stream);
        }
    }

    private  BambooVersionExtractor();

}