class URLConnection extends java.net.URLConnection {

    @Override
    public Map<String, List<String>> getHeaderFields() {
		try {
			connect();
		} catch (IOException e) {
			throw new IllegalStateException(e);
		}
		final Map<String, List<String>> flds = new HashMap<>();
    	flds.put(CONTENT_TYPE, singletonList(this.contentType));
    	flds.put(CONTENT_LENGTH, singletonList(Long.toString(this.file.length())));
    	flds.put(LAST_MODIFIED, singletonList(Long.toString(this.file.lastModified())));
        return flds;
    }

    protected  URLConnection(URL url);

}