All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dragome.commons.compiler.classpath.JavaFileClasspathFile Maven / Gradle / Ivy

The newest version!
package com.dragome.commons.compiler.classpath;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

public class JavaFileClasspathFile extends AbstractClasspathFile
{
	private File file;

	public String getFilename()
	{
		return file != null ? file.getName() : "";
	}

	public void setFile(File file)
	{
		this.file= file;
	}

	public JavaFileClasspathFile(File folder, String path)
	{
		super(path);
		this.file= new File(folder, path);

		lastModified= file.lastModified();
	}

	public InputStream openInputStream()
	{
		try
		{
			return inputStream= new FileInputStream(file);
		}
		catch (FileNotFoundException e)
		{
			throw new RuntimeException(e);
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy