<commit_before>package net.coobird.thumbnailator.tasks.io;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.Proxy;
import java.net.URL;

public class URLImageSource extends AbstractImageSource
{
	private final URL url;
	private final Proxy proxy;

	/**
	 * @param is
	 */
	public URLImageSource(URL url)
	{
		super();
		this.url = url;
		this.proxy = null;
	}
	
	/**
	 * @param url
	 * @param proxy
	 */
	public URLImageSource(URL url, Proxy proxy)
	{
		super();
		this.url = url;
		this.proxy = proxy;
	}

	public BufferedImage read() throws IOException
	{
		InputStreamImageSource source;
		
		if (proxy != null)
		{
			source = new InputStreamImageSource(url.openConnection(proxy).getInputStream());
		}
		else
		{
			source = new InputStreamImageSource(url.openStream());
		}
		
		return source.read();
	}
}<commit_msg>Fixed `read` to set the input format name.<commit_after>package net.coobird.thumbnailator.tasks.io;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.Proxy;
import java.net.URL;

public class URLImageSource extends AbstractImageSource
{
	private final URL url;
	private final Proxy proxy;

	/**
	 * @param is
	 */
	public URLImageSource(URL url)
	{
		super();
		this.url = url;
		this.proxy = null;
	}
	
	/**
	 * @param url
	 * @param proxy
	 */
	public URLImageSource(URL url, Proxy proxy)
	{
		super();
		this.url = url;
		this.proxy = proxy;
	}

	public BufferedImage read() throws IOException
	{
		InputStreamImageSource source;
		
		if (proxy != null)
		{
			source = new InputStreamImageSource(url.openConnection(proxy).getInputStream());
		}
		else
		{
			source = new InputStreamImageSource(url.openStream());
		}
		
		BufferedImage img = source.read();
		this.inputFormatName = source.getInputFormatName();
		
		return img;
	}
}
{'fraction_non_alphanumeric': 0.1178082191780822, 'fraction_numerical': 0.0, 'mean_word_length': 3.6227848101265825, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3953513', 'n_tokens_mistral': 663, 'n_tokens_neox': 590, 'n_words': 144}